// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package wafv2 import ( "fmt" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opAssociateWebACL = "AssociateWebACL" // AssociateWebACLRequest generates a "aws/request.Request" representing the // client's request for the AssociateWebACL operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See AssociateWebACL for more information on using the AssociateWebACL // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the AssociateWebACLRequest method. // req, resp := client.AssociateWebACLRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/AssociateWebACL func (c *WAFV2) AssociateWebACLRequest(input *AssociateWebACLInput) (req *request.Request, output *AssociateWebACLOutput) { op := &request.Operation{ Name: opAssociateWebACL, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &AssociateWebACLInput{} } output = &AssociateWebACLOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // AssociateWebACL API operation for AWS WAFV2. // // Associates a web ACL with a regional application resource, to protect the // resource. A regional application can be an Application Load Balancer (ALB), // an Amazon API Gateway REST API, or an AppSync GraphQL API. // // For Amazon CloudFront, don't use this call. Instead, use your CloudFront // distribution configuration. To associate a web ACL, in the CloudFront call // UpdateDistribution, set the web ACL ID to the Amazon Resource Name (ARN) // of the web ACL. For information, see UpdateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation AssociateWebACL for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFUnavailableEntityException // WAF couldn’t retrieve the resource that you requested. Retry your request. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/AssociateWebACL func (c *WAFV2) AssociateWebACL(input *AssociateWebACLInput) (*AssociateWebACLOutput, error) { req, out := c.AssociateWebACLRequest(input) return out, req.Send() } // AssociateWebACLWithContext is the same as AssociateWebACL with the addition of // the ability to pass a context and additional request options. // // See AssociateWebACL for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) AssociateWebACLWithContext(ctx aws.Context, input *AssociateWebACLInput, opts ...request.Option) (*AssociateWebACLOutput, error) { req, out := c.AssociateWebACLRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCheckCapacity = "CheckCapacity" // CheckCapacityRequest generates a "aws/request.Request" representing the // client's request for the CheckCapacity operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CheckCapacity for more information on using the CheckCapacity // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the CheckCapacityRequest method. // req, resp := client.CheckCapacityRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CheckCapacity func (c *WAFV2) CheckCapacityRequest(input *CheckCapacityInput) (req *request.Request, output *CheckCapacityOutput) { op := &request.Operation{ Name: opCheckCapacity, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CheckCapacityInput{} } output = &CheckCapacityOutput{} req = c.newRequest(op, input, output) return } // CheckCapacity API operation for AWS WAFV2. // // Returns the web ACL capacity unit (WCU) requirements for a specified scope // and set of rules. You can use this to check the capacity requirements for // the rules you want to use in a RuleGroup or WebACL. // // WAF uses WCUs to calculate and control the operating resources that are used // to run your rules, rule groups, and web ACLs. WAF calculates capacity differently // for each rule type, to reflect the relative cost of each rule. Simple rules // that cost little to run use fewer WCUs than more complex rules that use more // processing power. Rule group capacity is fixed at creation, which helps users // plan their web ACL WCU usage when they use a rule group. The WCU limit for // web ACLs is 1,500. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation CheckCapacity for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFLimitsExceededException // WAF couldn’t perform the operation because you exceeded your resource limit. // For example, the maximum number of WebACL objects that you can create for // an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide. // // * WAFInvalidResourceException // WAF couldn’t perform the operation because the resource that you requested // isn’t valid. Check the resource, and try again. // // * WAFUnavailableEntityException // WAF couldn’t retrieve the resource that you requested. Retry your request. // // * WAFSubscriptionNotFoundException // You tried to use a managed rule group that's available by subscription, but // you aren't subscribed to it yet. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CheckCapacity func (c *WAFV2) CheckCapacity(input *CheckCapacityInput) (*CheckCapacityOutput, error) { req, out := c.CheckCapacityRequest(input) return out, req.Send() } // CheckCapacityWithContext is the same as CheckCapacity with the addition of // the ability to pass a context and additional request options. // // See CheckCapacity for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) CheckCapacityWithContext(ctx aws.Context, input *CheckCapacityInput, opts ...request.Option) (*CheckCapacityOutput, error) { req, out := c.CheckCapacityRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the // client's request for the CreateIPSet operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateIPSet for more information on using the CreateIPSet // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the CreateIPSetRequest method. // req, resp := client.CreateIPSetRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateIPSet func (c *WAFV2) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, output *CreateIPSetOutput) { op := &request.Operation{ Name: opCreateIPSet, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateIPSetInput{} } output = &CreateIPSetOutput{} req = c.newRequest(op, input, output) return } // CreateIPSet API operation for AWS WAFV2. // // Creates an IPSet, which you use to identify web requests that originate from // specific IP addresses or ranges of IP addresses. For example, if you're receiving // a lot of requests from a ranges of IP addresses, you can configure WAF to // block them using an IPSet that lists those IP addresses. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation CreateIPSet for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFDuplicateItemException // WAF couldn’t perform the operation because the resource that you tried // to save is a duplicate of an existing one. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFLimitsExceededException // WAF couldn’t perform the operation because you exceeded your resource limit. // For example, the maximum number of WebACL objects that you can create for // an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide. // // * WAFTagOperationException // An error occurred during the tagging operation. Retry your request. // // * WAFTagOperationInternalErrorException // WAF couldn’t perform your tagging operation because of an internal error. // Retry your request. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateIPSet func (c *WAFV2) CreateIPSet(input *CreateIPSetInput) (*CreateIPSetOutput, error) { req, out := c.CreateIPSetRequest(input) return out, req.Send() } // CreateIPSetWithContext is the same as CreateIPSet with the addition of // the ability to pass a context and additional request options. // // See CreateIPSet for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) CreateIPSetWithContext(ctx aws.Context, input *CreateIPSetInput, opts ...request.Option) (*CreateIPSetOutput, error) { req, out := c.CreateIPSetRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateRegexPatternSet = "CreateRegexPatternSet" // CreateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateRegexPatternSet for more information on using the CreateRegexPatternSet // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the CreateRegexPatternSetRequest method. // req, resp := client.CreateRegexPatternSetRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRegexPatternSet func (c *WAFV2) CreateRegexPatternSetRequest(input *CreateRegexPatternSetInput) (req *request.Request, output *CreateRegexPatternSetOutput) { op := &request.Operation{ Name: opCreateRegexPatternSet, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateRegexPatternSetInput{} } output = &CreateRegexPatternSetOutput{} req = c.newRequest(op, input, output) return } // CreateRegexPatternSet API operation for AWS WAFV2. // // Creates a RegexPatternSet, which you reference in a RegexPatternSetReferenceStatement, // to have WAF inspect a web request component for the specified patterns. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation CreateRegexPatternSet for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFDuplicateItemException // WAF couldn’t perform the operation because the resource that you tried // to save is a duplicate of an existing one. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFLimitsExceededException // WAF couldn’t perform the operation because you exceeded your resource limit. // For example, the maximum number of WebACL objects that you can create for // an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide. // // * WAFTagOperationException // An error occurred during the tagging operation. Retry your request. // // * WAFTagOperationInternalErrorException // WAF couldn’t perform your tagging operation because of an internal error. // Retry your request. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRegexPatternSet func (c *WAFV2) CreateRegexPatternSet(input *CreateRegexPatternSetInput) (*CreateRegexPatternSetOutput, error) { req, out := c.CreateRegexPatternSetRequest(input) return out, req.Send() } // CreateRegexPatternSetWithContext is the same as CreateRegexPatternSet with the addition of // the ability to pass a context and additional request options. // // See CreateRegexPatternSet for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) CreateRegexPatternSetWithContext(ctx aws.Context, input *CreateRegexPatternSetInput, opts ...request.Option) (*CreateRegexPatternSetOutput, error) { req, out := c.CreateRegexPatternSetRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateRuleGroup = "CreateRuleGroup" // CreateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateRuleGroup for more information on using the CreateRuleGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the CreateRuleGroupRequest method. // req, resp := client.CreateRuleGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRuleGroup func (c *WAFV2) CreateRuleGroupRequest(input *CreateRuleGroupInput) (req *request.Request, output *CreateRuleGroupOutput) { op := &request.Operation{ Name: opCreateRuleGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateRuleGroupInput{} } output = &CreateRuleGroupOutput{} req = c.newRequest(op, input, output) return } // CreateRuleGroup API operation for AWS WAFV2. // // Creates a RuleGroup per the specifications provided. // // A rule group defines a collection of rules to inspect and control web requests // that you can use in a WebACL. When you create a rule group, you define an // immutable capacity limit. If you update a rule group, you must stay within // the capacity. This allows others to reuse the rule group with confidence // in its capacity requirements. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation CreateRuleGroup for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFDuplicateItemException // WAF couldn’t perform the operation because the resource that you tried // to save is a duplicate of an existing one. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFLimitsExceededException // WAF couldn’t perform the operation because you exceeded your resource limit. // For example, the maximum number of WebACL objects that you can create for // an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide. // // * WAFUnavailableEntityException // WAF couldn’t retrieve the resource that you requested. Retry your request. // // * WAFTagOperationException // An error occurred during the tagging operation. Retry your request. // // * WAFTagOperationInternalErrorException // WAF couldn’t perform your tagging operation because of an internal error. // Retry your request. // // * WAFSubscriptionNotFoundException // You tried to use a managed rule group that's available by subscription, but // you aren't subscribed to it yet. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRuleGroup func (c *WAFV2) CreateRuleGroup(input *CreateRuleGroupInput) (*CreateRuleGroupOutput, error) { req, out := c.CreateRuleGroupRequest(input) return out, req.Send() } // CreateRuleGroupWithContext is the same as CreateRuleGroup with the addition of // the ability to pass a context and additional request options. // // See CreateRuleGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) CreateRuleGroupWithContext(ctx aws.Context, input *CreateRuleGroupInput, opts ...request.Option) (*CreateRuleGroupOutput, error) { req, out := c.CreateRuleGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opCreateWebACL = "CreateWebACL" // CreateWebACLRequest generates a "aws/request.Request" representing the // client's request for the CreateWebACL operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See CreateWebACL for more information on using the CreateWebACL // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the CreateWebACLRequest method. // req, resp := client.CreateWebACLRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateWebACL func (c *WAFV2) CreateWebACLRequest(input *CreateWebACLInput) (req *request.Request, output *CreateWebACLOutput) { op := &request.Operation{ Name: opCreateWebACL, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &CreateWebACLInput{} } output = &CreateWebACLOutput{} req = c.newRequest(op, input, output) return } // CreateWebACL API operation for AWS WAFV2. // // Creates a WebACL per the specifications provided. // // A web ACL defines a collection of rules to use to inspect and control web // requests. Each rule has an action defined (allow, block, or count) for requests // that match the statement of the rule. In the web ACL, you assign a default // action to take (allow, block) for any request that does not match any of // the rules. The rules in a web ACL can be a combination of the types Rule, // RuleGroup, and managed rule group. You can associate a web ACL with one or // more Amazon Web Services resources to protect. The resources can be an Amazon // CloudFront distribution, an Amazon API Gateway REST API, an Application Load // Balancer, or an AppSync GraphQL API. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation CreateWebACL for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFDuplicateItemException // WAF couldn’t perform the operation because the resource that you tried // to save is a duplicate of an existing one. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFLimitsExceededException // WAF couldn’t perform the operation because you exceeded your resource limit. // For example, the maximum number of WebACL objects that you can create for // an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide. // // * WAFInvalidResourceException // WAF couldn’t perform the operation because the resource that you requested // isn’t valid. Check the resource, and try again. // // * WAFUnavailableEntityException // WAF couldn’t retrieve the resource that you requested. Retry your request. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFTagOperationException // An error occurred during the tagging operation. Retry your request. // // * WAFTagOperationInternalErrorException // WAF couldn’t perform your tagging operation because of an internal error. // Retry your request. // // * WAFSubscriptionNotFoundException // You tried to use a managed rule group that's available by subscription, but // you aren't subscribed to it yet. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateWebACL func (c *WAFV2) CreateWebACL(input *CreateWebACLInput) (*CreateWebACLOutput, error) { req, out := c.CreateWebACLRequest(input) return out, req.Send() } // CreateWebACLWithContext is the same as CreateWebACL with the addition of // the ability to pass a context and additional request options. // // See CreateWebACL for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) CreateWebACLWithContext(ctx aws.Context, input *CreateWebACLInput, opts ...request.Option) (*CreateWebACLOutput, error) { req, out := c.CreateWebACLRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteFirewallManagerRuleGroups = "DeleteFirewallManagerRuleGroups" // DeleteFirewallManagerRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the DeleteFirewallManagerRuleGroups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteFirewallManagerRuleGroups for more information on using the DeleteFirewallManagerRuleGroups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the DeleteFirewallManagerRuleGroupsRequest method. // req, resp := client.DeleteFirewallManagerRuleGroupsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteFirewallManagerRuleGroups func (c *WAFV2) DeleteFirewallManagerRuleGroupsRequest(input *DeleteFirewallManagerRuleGroupsInput) (req *request.Request, output *DeleteFirewallManagerRuleGroupsOutput) { op := &request.Operation{ Name: opDeleteFirewallManagerRuleGroups, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteFirewallManagerRuleGroupsInput{} } output = &DeleteFirewallManagerRuleGroupsOutput{} req = c.newRequest(op, input, output) return } // DeleteFirewallManagerRuleGroups API operation for AWS WAFV2. // // Deletes all rule groups that are managed by Firewall Manager for the specified // web ACL. // // You can only use this if ManagedByFirewallManager is false in the specified // WebACL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation DeleteFirewallManagerRuleGroups for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteFirewallManagerRuleGroups func (c *WAFV2) DeleteFirewallManagerRuleGroups(input *DeleteFirewallManagerRuleGroupsInput) (*DeleteFirewallManagerRuleGroupsOutput, error) { req, out := c.DeleteFirewallManagerRuleGroupsRequest(input) return out, req.Send() } // DeleteFirewallManagerRuleGroupsWithContext is the same as DeleteFirewallManagerRuleGroups with the addition of // the ability to pass a context and additional request options. // // See DeleteFirewallManagerRuleGroups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) DeleteFirewallManagerRuleGroupsWithContext(ctx aws.Context, input *DeleteFirewallManagerRuleGroupsInput, opts ...request.Option) (*DeleteFirewallManagerRuleGroupsOutput, error) { req, out := c.DeleteFirewallManagerRuleGroupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteIPSet operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteIPSet for more information on using the DeleteIPSet // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the DeleteIPSetRequest method. // req, resp := client.DeleteIPSetRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteIPSet func (c *WAFV2) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Request, output *DeleteIPSetOutput) { op := &request.Operation{ Name: opDeleteIPSet, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteIPSetInput{} } output = &DeleteIPSetOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteIPSet API operation for AWS WAFV2. // // Deletes the specified IPSet. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation DeleteIPSet for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFAssociatedItemException // WAF couldn’t perform the operation because your resource is being used // by another resource or it’s associated with another resource. // // * WAFTagOperationException // An error occurred during the tagging operation. Retry your request. // // * WAFTagOperationInternalErrorException // WAF couldn’t perform your tagging operation because of an internal error. // Retry your request. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteIPSet func (c *WAFV2) DeleteIPSet(input *DeleteIPSetInput) (*DeleteIPSetOutput, error) { req, out := c.DeleteIPSetRequest(input) return out, req.Send() } // DeleteIPSetWithContext is the same as DeleteIPSet with the addition of // the ability to pass a context and additional request options. // // See DeleteIPSet for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) DeleteIPSetWithContext(ctx aws.Context, input *DeleteIPSetInput, opts ...request.Option) (*DeleteIPSetOutput, error) { req, out := c.DeleteIPSetRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration" // DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteLoggingConfiguration for more information on using the DeleteLoggingConfiguration // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the DeleteLoggingConfigurationRequest method. // req, resp := client.DeleteLoggingConfigurationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteLoggingConfiguration func (c *WAFV2) DeleteLoggingConfigurationRequest(input *DeleteLoggingConfigurationInput) (req *request.Request, output *DeleteLoggingConfigurationOutput) { op := &request.Operation{ Name: opDeleteLoggingConfiguration, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteLoggingConfigurationInput{} } output = &DeleteLoggingConfigurationOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteLoggingConfiguration API operation for AWS WAFV2. // // Deletes the LoggingConfiguration from the specified web ACL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation DeleteLoggingConfiguration for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteLoggingConfiguration func (c *WAFV2) DeleteLoggingConfiguration(input *DeleteLoggingConfigurationInput) (*DeleteLoggingConfigurationOutput, error) { req, out := c.DeleteLoggingConfigurationRequest(input) return out, req.Send() } // DeleteLoggingConfigurationWithContext is the same as DeleteLoggingConfiguration with the addition of // the ability to pass a context and additional request options. // // See DeleteLoggingConfiguration for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) DeleteLoggingConfigurationWithContext(ctx aws.Context, input *DeleteLoggingConfigurationInput, opts ...request.Option) (*DeleteLoggingConfigurationOutput, error) { req, out := c.DeleteLoggingConfigurationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeletePermissionPolicy = "DeletePermissionPolicy" // DeletePermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeletePermissionPolicy for more information on using the DeletePermissionPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the DeletePermissionPolicyRequest method. // req, resp := client.DeletePermissionPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeletePermissionPolicy func (c *WAFV2) DeletePermissionPolicyRequest(input *DeletePermissionPolicyInput) (req *request.Request, output *DeletePermissionPolicyOutput) { op := &request.Operation{ Name: opDeletePermissionPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeletePermissionPolicyInput{} } output = &DeletePermissionPolicyOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeletePermissionPolicy API operation for AWS WAFV2. // // Permanently deletes an IAM policy from the specified rule group. // // You must be the owner of the rule group to perform this operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation DeletePermissionPolicy for usage and error information. // // Returned Error Types: // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeletePermissionPolicy func (c *WAFV2) DeletePermissionPolicy(input *DeletePermissionPolicyInput) (*DeletePermissionPolicyOutput, error) { req, out := c.DeletePermissionPolicyRequest(input) return out, req.Send() } // DeletePermissionPolicyWithContext is the same as DeletePermissionPolicy with the addition of // the ability to pass a context and additional request options. // // See DeletePermissionPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) DeletePermissionPolicyWithContext(ctx aws.Context, input *DeletePermissionPolicyInput, opts ...request.Option) (*DeletePermissionPolicyOutput, error) { req, out := c.DeletePermissionPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteRegexPatternSet = "DeleteRegexPatternSet" // DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteRegexPatternSet for more information on using the DeleteRegexPatternSet // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the DeleteRegexPatternSetRequest method. // req, resp := client.DeleteRegexPatternSetRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRegexPatternSet func (c *WAFV2) DeleteRegexPatternSetRequest(input *DeleteRegexPatternSetInput) (req *request.Request, output *DeleteRegexPatternSetOutput) { op := &request.Operation{ Name: opDeleteRegexPatternSet, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteRegexPatternSetInput{} } output = &DeleteRegexPatternSetOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteRegexPatternSet API operation for AWS WAFV2. // // Deletes the specified RegexPatternSet. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation DeleteRegexPatternSet for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFAssociatedItemException // WAF couldn’t perform the operation because your resource is being used // by another resource or it’s associated with another resource. // // * WAFTagOperationException // An error occurred during the tagging operation. Retry your request. // // * WAFTagOperationInternalErrorException // WAF couldn’t perform your tagging operation because of an internal error. // Retry your request. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRegexPatternSet func (c *WAFV2) DeleteRegexPatternSet(input *DeleteRegexPatternSetInput) (*DeleteRegexPatternSetOutput, error) { req, out := c.DeleteRegexPatternSetRequest(input) return out, req.Send() } // DeleteRegexPatternSetWithContext is the same as DeleteRegexPatternSet with the addition of // the ability to pass a context and additional request options. // // See DeleteRegexPatternSet for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) DeleteRegexPatternSetWithContext(ctx aws.Context, input *DeleteRegexPatternSetInput, opts ...request.Option) (*DeleteRegexPatternSetOutput, error) { req, out := c.DeleteRegexPatternSetRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteRuleGroup = "DeleteRuleGroup" // DeleteRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteRuleGroup for more information on using the DeleteRuleGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the DeleteRuleGroupRequest method. // req, resp := client.DeleteRuleGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRuleGroup func (c *WAFV2) DeleteRuleGroupRequest(input *DeleteRuleGroupInput) (req *request.Request, output *DeleteRuleGroupOutput) { op := &request.Operation{ Name: opDeleteRuleGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteRuleGroupInput{} } output = &DeleteRuleGroupOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteRuleGroup API operation for AWS WAFV2. // // Deletes the specified RuleGroup. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation DeleteRuleGroup for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFAssociatedItemException // WAF couldn’t perform the operation because your resource is being used // by another resource or it’s associated with another resource. // // * WAFTagOperationException // An error occurred during the tagging operation. Retry your request. // // * WAFTagOperationInternalErrorException // WAF couldn’t perform your tagging operation because of an internal error. // Retry your request. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRuleGroup func (c *WAFV2) DeleteRuleGroup(input *DeleteRuleGroupInput) (*DeleteRuleGroupOutput, error) { req, out := c.DeleteRuleGroupRequest(input) return out, req.Send() } // DeleteRuleGroupWithContext is the same as DeleteRuleGroup with the addition of // the ability to pass a context and additional request options. // // See DeleteRuleGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) DeleteRuleGroupWithContext(ctx aws.Context, input *DeleteRuleGroupInput, opts ...request.Option) (*DeleteRuleGroupOutput, error) { req, out := c.DeleteRuleGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDeleteWebACL = "DeleteWebACL" // DeleteWebACLRequest generates a "aws/request.Request" representing the // client's request for the DeleteWebACL operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DeleteWebACL for more information on using the DeleteWebACL // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the DeleteWebACLRequest method. // req, resp := client.DeleteWebACLRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteWebACL func (c *WAFV2) DeleteWebACLRequest(input *DeleteWebACLInput) (req *request.Request, output *DeleteWebACLOutput) { op := &request.Operation{ Name: opDeleteWebACL, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteWebACLInput{} } output = &DeleteWebACLOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteWebACL API operation for AWS WAFV2. // // Deletes the specified WebACL. // // You can only use this if ManagedByFirewallManager is false in the specified // WebACL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation DeleteWebACL for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFAssociatedItemException // WAF couldn’t perform the operation because your resource is being used // by another resource or it’s associated with another resource. // // * WAFTagOperationException // An error occurred during the tagging operation. Retry your request. // // * WAFTagOperationInternalErrorException // WAF couldn’t perform your tagging operation because of an internal error. // Retry your request. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteWebACL func (c *WAFV2) DeleteWebACL(input *DeleteWebACLInput) (*DeleteWebACLOutput, error) { req, out := c.DeleteWebACLRequest(input) return out, req.Send() } // DeleteWebACLWithContext is the same as DeleteWebACL with the addition of // the ability to pass a context and additional request options. // // See DeleteWebACL for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) DeleteWebACLWithContext(ctx aws.Context, input *DeleteWebACLInput, opts ...request.Option) (*DeleteWebACLOutput, error) { req, out := c.DeleteWebACLRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDescribeManagedRuleGroup = "DescribeManagedRuleGroup" // DescribeManagedRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the DescribeManagedRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DescribeManagedRuleGroup for more information on using the DescribeManagedRuleGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the DescribeManagedRuleGroupRequest method. // req, resp := client.DescribeManagedRuleGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DescribeManagedRuleGroup func (c *WAFV2) DescribeManagedRuleGroupRequest(input *DescribeManagedRuleGroupInput) (req *request.Request, output *DescribeManagedRuleGroupOutput) { op := &request.Operation{ Name: opDescribeManagedRuleGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeManagedRuleGroupInput{} } output = &DescribeManagedRuleGroupOutput{} req = c.newRequest(op, input, output) return } // DescribeManagedRuleGroup API operation for AWS WAFV2. // // Provides high-level information for a managed rule group, including descriptions // of the rules. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation DescribeManagedRuleGroup for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFInvalidResourceException // WAF couldn’t perform the operation because the resource that you requested // isn’t valid. Check the resource, and try again. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DescribeManagedRuleGroup func (c *WAFV2) DescribeManagedRuleGroup(input *DescribeManagedRuleGroupInput) (*DescribeManagedRuleGroupOutput, error) { req, out := c.DescribeManagedRuleGroupRequest(input) return out, req.Send() } // DescribeManagedRuleGroupWithContext is the same as DescribeManagedRuleGroup with the addition of // the ability to pass a context and additional request options. // // See DescribeManagedRuleGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) DescribeManagedRuleGroupWithContext(ctx aws.Context, input *DescribeManagedRuleGroupInput, opts ...request.Option) (*DescribeManagedRuleGroupOutput, error) { req, out := c.DescribeManagedRuleGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opDisassociateWebACL = "DisassociateWebACL" // DisassociateWebACLRequest generates a "aws/request.Request" representing the // client's request for the DisassociateWebACL operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See DisassociateWebACL for more information on using the DisassociateWebACL // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the DisassociateWebACLRequest method. // req, resp := client.DisassociateWebACLRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DisassociateWebACL func (c *WAFV2) DisassociateWebACLRequest(input *DisassociateWebACLInput) (req *request.Request, output *DisassociateWebACLOutput) { op := &request.Operation{ Name: opDisassociateWebACL, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DisassociateWebACLInput{} } output = &DisassociateWebACLOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DisassociateWebACL API operation for AWS WAFV2. // // Disassociates a web ACL from a regional application resource. A regional // application can be an Application Load Balancer (ALB), an Amazon API Gateway // REST API, or an AppSync GraphQL API. // // For Amazon CloudFront, don't use this call. Instead, use your CloudFront // distribution configuration. To disassociate a web ACL, provide an empty web // ACL ID in the CloudFront call UpdateDistribution. For information, see UpdateDistribution // (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation DisassociateWebACL for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DisassociateWebACL func (c *WAFV2) DisassociateWebACL(input *DisassociateWebACLInput) (*DisassociateWebACLOutput, error) { req, out := c.DisassociateWebACLRequest(input) return out, req.Send() } // DisassociateWebACLWithContext is the same as DisassociateWebACL with the addition of // the ability to pass a context and additional request options. // // See DisassociateWebACL for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) DisassociateWebACLWithContext(ctx aws.Context, input *DisassociateWebACLInput, opts ...request.Option) (*DisassociateWebACLOutput, error) { req, out := c.DisassociateWebACLRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetIPSet = "GetIPSet" // GetIPSetRequest generates a "aws/request.Request" representing the // client's request for the GetIPSet operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetIPSet for more information on using the GetIPSet // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the GetIPSetRequest method. // req, resp := client.GetIPSetRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetIPSet func (c *WAFV2) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, output *GetIPSetOutput) { op := &request.Operation{ Name: opGetIPSet, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetIPSetInput{} } output = &GetIPSetOutput{} req = c.newRequest(op, input, output) return } // GetIPSet API operation for AWS WAFV2. // // Retrieves the specified IPSet. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation GetIPSet for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetIPSet func (c *WAFV2) GetIPSet(input *GetIPSetInput) (*GetIPSetOutput, error) { req, out := c.GetIPSetRequest(input) return out, req.Send() } // GetIPSetWithContext is the same as GetIPSet with the addition of // the ability to pass a context and additional request options. // // See GetIPSet for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) GetIPSetWithContext(ctx aws.Context, input *GetIPSetInput, opts ...request.Option) (*GetIPSetOutput, error) { req, out := c.GetIPSetRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetLoggingConfiguration = "GetLoggingConfiguration" // GetLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetLoggingConfiguration for more information on using the GetLoggingConfiguration // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the GetLoggingConfigurationRequest method. // req, resp := client.GetLoggingConfigurationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetLoggingConfiguration func (c *WAFV2) GetLoggingConfigurationRequest(input *GetLoggingConfigurationInput) (req *request.Request, output *GetLoggingConfigurationOutput) { op := &request.Operation{ Name: opGetLoggingConfiguration, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetLoggingConfigurationInput{} } output = &GetLoggingConfigurationOutput{} req = c.newRequest(op, input, output) return } // GetLoggingConfiguration API operation for AWS WAFV2. // // Returns the LoggingConfiguration for the specified web ACL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation GetLoggingConfiguration for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetLoggingConfiguration func (c *WAFV2) GetLoggingConfiguration(input *GetLoggingConfigurationInput) (*GetLoggingConfigurationOutput, error) { req, out := c.GetLoggingConfigurationRequest(input) return out, req.Send() } // GetLoggingConfigurationWithContext is the same as GetLoggingConfiguration with the addition of // the ability to pass a context and additional request options. // // See GetLoggingConfiguration for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) GetLoggingConfigurationWithContext(ctx aws.Context, input *GetLoggingConfigurationInput, opts ...request.Option) (*GetLoggingConfigurationOutput, error) { req, out := c.GetLoggingConfigurationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetPermissionPolicy = "GetPermissionPolicy" // GetPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetPermissionPolicy for more information on using the GetPermissionPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the GetPermissionPolicyRequest method. // req, resp := client.GetPermissionPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetPermissionPolicy func (c *WAFV2) GetPermissionPolicyRequest(input *GetPermissionPolicyInput) (req *request.Request, output *GetPermissionPolicyOutput) { op := &request.Operation{ Name: opGetPermissionPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetPermissionPolicyInput{} } output = &GetPermissionPolicyOutput{} req = c.newRequest(op, input, output) return } // GetPermissionPolicy API operation for AWS WAFV2. // // Returns the IAM policy that is attached to the specified rule group. // // You must be the owner of the rule group to perform this operation. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation GetPermissionPolicy for usage and error information. // // Returned Error Types: // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetPermissionPolicy func (c *WAFV2) GetPermissionPolicy(input *GetPermissionPolicyInput) (*GetPermissionPolicyOutput, error) { req, out := c.GetPermissionPolicyRequest(input) return out, req.Send() } // GetPermissionPolicyWithContext is the same as GetPermissionPolicy with the addition of // the ability to pass a context and additional request options. // // See GetPermissionPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) GetPermissionPolicyWithContext(ctx aws.Context, input *GetPermissionPolicyInput, opts ...request.Option) (*GetPermissionPolicyOutput, error) { req, out := c.GetPermissionPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetRateBasedStatementManagedKeys = "GetRateBasedStatementManagedKeys" // GetRateBasedStatementManagedKeysRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedStatementManagedKeys operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetRateBasedStatementManagedKeys for more information on using the GetRateBasedStatementManagedKeys // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the GetRateBasedStatementManagedKeysRequest method. // req, resp := client.GetRateBasedStatementManagedKeysRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRateBasedStatementManagedKeys func (c *WAFV2) GetRateBasedStatementManagedKeysRequest(input *GetRateBasedStatementManagedKeysInput) (req *request.Request, output *GetRateBasedStatementManagedKeysOutput) { op := &request.Operation{ Name: opGetRateBasedStatementManagedKeys, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetRateBasedStatementManagedKeysInput{} } output = &GetRateBasedStatementManagedKeysOutput{} req = c.newRequest(op, input, output) return } // GetRateBasedStatementManagedKeys API operation for AWS WAFV2. // // Retrieves the keys that are currently blocked by a rate-based rule. The maximum // number of managed keys that can be blocked for a single rate-based rule is // 10,000. If more than 10,000 addresses exceed the rate limit, those with the // highest rates are blocked. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation GetRateBasedStatementManagedKeys for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRateBasedStatementManagedKeys func (c *WAFV2) GetRateBasedStatementManagedKeys(input *GetRateBasedStatementManagedKeysInput) (*GetRateBasedStatementManagedKeysOutput, error) { req, out := c.GetRateBasedStatementManagedKeysRequest(input) return out, req.Send() } // GetRateBasedStatementManagedKeysWithContext is the same as GetRateBasedStatementManagedKeys with the addition of // the ability to pass a context and additional request options. // // See GetRateBasedStatementManagedKeys for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) GetRateBasedStatementManagedKeysWithContext(ctx aws.Context, input *GetRateBasedStatementManagedKeysInput, opts ...request.Option) (*GetRateBasedStatementManagedKeysOutput, error) { req, out := c.GetRateBasedStatementManagedKeysRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetRegexPatternSet = "GetRegexPatternSet" // GetRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetRegexPatternSet for more information on using the GetRegexPatternSet // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the GetRegexPatternSetRequest method. // req, resp := client.GetRegexPatternSetRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRegexPatternSet func (c *WAFV2) GetRegexPatternSetRequest(input *GetRegexPatternSetInput) (req *request.Request, output *GetRegexPatternSetOutput) { op := &request.Operation{ Name: opGetRegexPatternSet, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetRegexPatternSetInput{} } output = &GetRegexPatternSetOutput{} req = c.newRequest(op, input, output) return } // GetRegexPatternSet API operation for AWS WAFV2. // // Retrieves the specified RegexPatternSet. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation GetRegexPatternSet for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRegexPatternSet func (c *WAFV2) GetRegexPatternSet(input *GetRegexPatternSetInput) (*GetRegexPatternSetOutput, error) { req, out := c.GetRegexPatternSetRequest(input) return out, req.Send() } // GetRegexPatternSetWithContext is the same as GetRegexPatternSet with the addition of // the ability to pass a context and additional request options. // // See GetRegexPatternSet for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) GetRegexPatternSetWithContext(ctx aws.Context, input *GetRegexPatternSetInput, opts ...request.Option) (*GetRegexPatternSetOutput, error) { req, out := c.GetRegexPatternSetRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetRuleGroup = "GetRuleGroup" // GetRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the GetRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetRuleGroup for more information on using the GetRuleGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the GetRuleGroupRequest method. // req, resp := client.GetRuleGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRuleGroup func (c *WAFV2) GetRuleGroupRequest(input *GetRuleGroupInput) (req *request.Request, output *GetRuleGroupOutput) { op := &request.Operation{ Name: opGetRuleGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetRuleGroupInput{} } output = &GetRuleGroupOutput{} req = c.newRequest(op, input, output) return } // GetRuleGroup API operation for AWS WAFV2. // // Retrieves the specified RuleGroup. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation GetRuleGroup for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRuleGroup func (c *WAFV2) GetRuleGroup(input *GetRuleGroupInput) (*GetRuleGroupOutput, error) { req, out := c.GetRuleGroupRequest(input) return out, req.Send() } // GetRuleGroupWithContext is the same as GetRuleGroup with the addition of // the ability to pass a context and additional request options. // // See GetRuleGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) GetRuleGroupWithContext(ctx aws.Context, input *GetRuleGroupInput, opts ...request.Option) (*GetRuleGroupOutput, error) { req, out := c.GetRuleGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetSampledRequests = "GetSampledRequests" // GetSampledRequestsRequest generates a "aws/request.Request" representing the // client's request for the GetSampledRequests operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetSampledRequests for more information on using the GetSampledRequests // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the GetSampledRequestsRequest method. // req, resp := client.GetSampledRequestsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetSampledRequests func (c *WAFV2) GetSampledRequestsRequest(input *GetSampledRequestsInput) (req *request.Request, output *GetSampledRequestsOutput) { op := &request.Operation{ Name: opGetSampledRequests, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetSampledRequestsInput{} } output = &GetSampledRequestsOutput{} req = c.newRequest(op, input, output) return } // GetSampledRequests API operation for AWS WAFV2. // // Gets detailed information about a specified number of requests--a sample--that // WAF randomly selects from among the first 5,000 requests that your Amazon // Web Services resource received during a time range that you choose. You can // specify a sample size of up to 500 requests, and you can specify any time // range in the previous three hours. // // GetSampledRequests returns a time range, which is usually the time range // that you specified. However, if your resource (such as a CloudFront distribution) // received 5,000 requests before the specified time range elapsed, GetSampledRequests // returns an updated time range. This new time range indicates the actual period // during which WAF selected the requests in the sample. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation GetSampledRequests for usage and error information. // // Returned Error Types: // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetSampledRequests func (c *WAFV2) GetSampledRequests(input *GetSampledRequestsInput) (*GetSampledRequestsOutput, error) { req, out := c.GetSampledRequestsRequest(input) return out, req.Send() } // GetSampledRequestsWithContext is the same as GetSampledRequests with the addition of // the ability to pass a context and additional request options. // // See GetSampledRequests for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) GetSampledRequestsWithContext(ctx aws.Context, input *GetSampledRequestsInput, opts ...request.Option) (*GetSampledRequestsOutput, error) { req, out := c.GetSampledRequestsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetWebACL = "GetWebACL" // GetWebACLRequest generates a "aws/request.Request" representing the // client's request for the GetWebACL operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetWebACL for more information on using the GetWebACL // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the GetWebACLRequest method. // req, resp := client.GetWebACLRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACL func (c *WAFV2) GetWebACLRequest(input *GetWebACLInput) (req *request.Request, output *GetWebACLOutput) { op := &request.Operation{ Name: opGetWebACL, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetWebACLInput{} } output = &GetWebACLOutput{} req = c.newRequest(op, input, output) return } // GetWebACL API operation for AWS WAFV2. // // Retrieves the specified WebACL. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation GetWebACL for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACL func (c *WAFV2) GetWebACL(input *GetWebACLInput) (*GetWebACLOutput, error) { req, out := c.GetWebACLRequest(input) return out, req.Send() } // GetWebACLWithContext is the same as GetWebACL with the addition of // the ability to pass a context and additional request options. // // See GetWebACL for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) GetWebACLWithContext(ctx aws.Context, input *GetWebACLInput, opts ...request.Option) (*GetWebACLOutput, error) { req, out := c.GetWebACLRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opGetWebACLForResource = "GetWebACLForResource" // GetWebACLForResourceRequest generates a "aws/request.Request" representing the // client's request for the GetWebACLForResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See GetWebACLForResource for more information on using the GetWebACLForResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the GetWebACLForResourceRequest method. // req, resp := client.GetWebACLForResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACLForResource func (c *WAFV2) GetWebACLForResourceRequest(input *GetWebACLForResourceInput) (req *request.Request, output *GetWebACLForResourceOutput) { op := &request.Operation{ Name: opGetWebACLForResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &GetWebACLForResourceInput{} } output = &GetWebACLForResourceOutput{} req = c.newRequest(op, input, output) return } // GetWebACLForResource API operation for AWS WAFV2. // // Retrieves the WebACL for the specified resource. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation GetWebACLForResource for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFUnavailableEntityException // WAF couldn’t retrieve the resource that you requested. Retry your request. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACLForResource func (c *WAFV2) GetWebACLForResource(input *GetWebACLForResourceInput) (*GetWebACLForResourceOutput, error) { req, out := c.GetWebACLForResourceRequest(input) return out, req.Send() } // GetWebACLForResourceWithContext is the same as GetWebACLForResource with the addition of // the ability to pass a context and additional request options. // // See GetWebACLForResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) GetWebACLForResourceWithContext(ctx aws.Context, input *GetWebACLForResourceInput, opts ...request.Option) (*GetWebACLForResourceOutput, error) { req, out := c.GetWebACLForResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListAvailableManagedRuleGroups = "ListAvailableManagedRuleGroups" // ListAvailableManagedRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListAvailableManagedRuleGroups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListAvailableManagedRuleGroups for more information on using the ListAvailableManagedRuleGroups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the ListAvailableManagedRuleGroupsRequest method. // req, resp := client.ListAvailableManagedRuleGroupsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListAvailableManagedRuleGroups func (c *WAFV2) ListAvailableManagedRuleGroupsRequest(input *ListAvailableManagedRuleGroupsInput) (req *request.Request, output *ListAvailableManagedRuleGroupsOutput) { op := &request.Operation{ Name: opListAvailableManagedRuleGroups, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListAvailableManagedRuleGroupsInput{} } output = &ListAvailableManagedRuleGroupsOutput{} req = c.newRequest(op, input, output) return } // ListAvailableManagedRuleGroups API operation for AWS WAFV2. // // Retrieves an array of managed rule groups that are available for you to use. // This list includes all Amazon Web Services Managed Rules rule groups and // the Marketplace managed rule groups that you're subscribed to. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation ListAvailableManagedRuleGroups for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListAvailableManagedRuleGroups func (c *WAFV2) ListAvailableManagedRuleGroups(input *ListAvailableManagedRuleGroupsInput) (*ListAvailableManagedRuleGroupsOutput, error) { req, out := c.ListAvailableManagedRuleGroupsRequest(input) return out, req.Send() } // ListAvailableManagedRuleGroupsWithContext is the same as ListAvailableManagedRuleGroups with the addition of // the ability to pass a context and additional request options. // // See ListAvailableManagedRuleGroups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) ListAvailableManagedRuleGroupsWithContext(ctx aws.Context, input *ListAvailableManagedRuleGroupsInput, opts ...request.Option) (*ListAvailableManagedRuleGroupsOutput, error) { req, out := c.ListAvailableManagedRuleGroupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListIPSets = "ListIPSets" // ListIPSetsRequest generates a "aws/request.Request" representing the // client's request for the ListIPSets operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListIPSets for more information on using the ListIPSets // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the ListIPSetsRequest method. // req, resp := client.ListIPSetsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListIPSets func (c *WAFV2) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Request, output *ListIPSetsOutput) { op := &request.Operation{ Name: opListIPSets, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListIPSetsInput{} } output = &ListIPSetsOutput{} req = c.newRequest(op, input, output) return } // ListIPSets API operation for AWS WAFV2. // // Retrieves an array of IPSetSummary objects for the IP sets that you manage. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation ListIPSets for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListIPSets func (c *WAFV2) ListIPSets(input *ListIPSetsInput) (*ListIPSetsOutput, error) { req, out := c.ListIPSetsRequest(input) return out, req.Send() } // ListIPSetsWithContext is the same as ListIPSets with the addition of // the ability to pass a context and additional request options. // // See ListIPSets for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) ListIPSetsWithContext(ctx aws.Context, input *ListIPSetsInput, opts ...request.Option) (*ListIPSetsOutput, error) { req, out := c.ListIPSetsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListLoggingConfigurations = "ListLoggingConfigurations" // ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListLoggingConfigurations operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListLoggingConfigurations for more information on using the ListLoggingConfigurations // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the ListLoggingConfigurationsRequest method. // req, resp := client.ListLoggingConfigurationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListLoggingConfigurations func (c *WAFV2) ListLoggingConfigurationsRequest(input *ListLoggingConfigurationsInput) (req *request.Request, output *ListLoggingConfigurationsOutput) { op := &request.Operation{ Name: opListLoggingConfigurations, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListLoggingConfigurationsInput{} } output = &ListLoggingConfigurationsOutput{} req = c.newRequest(op, input, output) return } // ListLoggingConfigurations API operation for AWS WAFV2. // // Retrieves an array of your LoggingConfiguration objects. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation ListLoggingConfigurations for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListLoggingConfigurations func (c *WAFV2) ListLoggingConfigurations(input *ListLoggingConfigurationsInput) (*ListLoggingConfigurationsOutput, error) { req, out := c.ListLoggingConfigurationsRequest(input) return out, req.Send() } // ListLoggingConfigurationsWithContext is the same as ListLoggingConfigurations with the addition of // the ability to pass a context and additional request options. // // See ListLoggingConfigurations for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) ListLoggingConfigurationsWithContext(ctx aws.Context, input *ListLoggingConfigurationsInput, opts ...request.Option) (*ListLoggingConfigurationsOutput, error) { req, out := c.ListLoggingConfigurationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListRegexPatternSets = "ListRegexPatternSets" // ListRegexPatternSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexPatternSets operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListRegexPatternSets for more information on using the ListRegexPatternSets // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the ListRegexPatternSetsRequest method. // req, resp := client.ListRegexPatternSetsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRegexPatternSets func (c *WAFV2) ListRegexPatternSetsRequest(input *ListRegexPatternSetsInput) (req *request.Request, output *ListRegexPatternSetsOutput) { op := &request.Operation{ Name: opListRegexPatternSets, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListRegexPatternSetsInput{} } output = &ListRegexPatternSetsOutput{} req = c.newRequest(op, input, output) return } // ListRegexPatternSets API operation for AWS WAFV2. // // Retrieves an array of RegexPatternSetSummary objects for the regex pattern // sets that you manage. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation ListRegexPatternSets for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRegexPatternSets func (c *WAFV2) ListRegexPatternSets(input *ListRegexPatternSetsInput) (*ListRegexPatternSetsOutput, error) { req, out := c.ListRegexPatternSetsRequest(input) return out, req.Send() } // ListRegexPatternSetsWithContext is the same as ListRegexPatternSets with the addition of // the ability to pass a context and additional request options. // // See ListRegexPatternSets for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) ListRegexPatternSetsWithContext(ctx aws.Context, input *ListRegexPatternSetsInput, opts ...request.Option) (*ListRegexPatternSetsOutput, error) { req, out := c.ListRegexPatternSetsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListResourcesForWebACL = "ListResourcesForWebACL" // ListResourcesForWebACLRequest generates a "aws/request.Request" representing the // client's request for the ListResourcesForWebACL operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListResourcesForWebACL for more information on using the ListResourcesForWebACL // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the ListResourcesForWebACLRequest method. // req, resp := client.ListResourcesForWebACLRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListResourcesForWebACL func (c *WAFV2) ListResourcesForWebACLRequest(input *ListResourcesForWebACLInput) (req *request.Request, output *ListResourcesForWebACLOutput) { op := &request.Operation{ Name: opListResourcesForWebACL, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListResourcesForWebACLInput{} } output = &ListResourcesForWebACLOutput{} req = c.newRequest(op, input, output) return } // ListResourcesForWebACL API operation for AWS WAFV2. // // Retrieves an array of the Amazon Resource Names (ARNs) for the regional resources // that are associated with the specified web ACL. If you want the list of Amazon // CloudFront resources, use the CloudFront call ListDistributionsByWebACLId. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation ListResourcesForWebACL for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListResourcesForWebACL func (c *WAFV2) ListResourcesForWebACL(input *ListResourcesForWebACLInput) (*ListResourcesForWebACLOutput, error) { req, out := c.ListResourcesForWebACLRequest(input) return out, req.Send() } // ListResourcesForWebACLWithContext is the same as ListResourcesForWebACL with the addition of // the ability to pass a context and additional request options. // // See ListResourcesForWebACL for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) ListResourcesForWebACLWithContext(ctx aws.Context, input *ListResourcesForWebACLInput, opts ...request.Option) (*ListResourcesForWebACLOutput, error) { req, out := c.ListResourcesForWebACLRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListRuleGroups = "ListRuleGroups" // ListRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListRuleGroups operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListRuleGroups for more information on using the ListRuleGroups // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the ListRuleGroupsRequest method. // req, resp := client.ListRuleGroupsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRuleGroups func (c *WAFV2) ListRuleGroupsRequest(input *ListRuleGroupsInput) (req *request.Request, output *ListRuleGroupsOutput) { op := &request.Operation{ Name: opListRuleGroups, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListRuleGroupsInput{} } output = &ListRuleGroupsOutput{} req = c.newRequest(op, input, output) return } // ListRuleGroups API operation for AWS WAFV2. // // Retrieves an array of RuleGroupSummary objects for the rule groups that you // manage. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation ListRuleGroups for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRuleGroups func (c *WAFV2) ListRuleGroups(input *ListRuleGroupsInput) (*ListRuleGroupsOutput, error) { req, out := c.ListRuleGroupsRequest(input) return out, req.Send() } // ListRuleGroupsWithContext is the same as ListRuleGroups with the addition of // the ability to pass a context and additional request options. // // See ListRuleGroups for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) ListRuleGroupsWithContext(ctx aws.Context, input *ListRuleGroupsInput, opts ...request.Option) (*ListRuleGroupsOutput, error) { req, out := c.ListRuleGroupsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListTagsForResource for more information on using the ListTagsForResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the ListTagsForResourceRequest method. // req, resp := client.ListTagsForResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListTagsForResource func (c *WAFV2) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { op := &request.Operation{ Name: opListTagsForResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListTagsForResourceInput{} } output = &ListTagsForResourceOutput{} req = c.newRequest(op, input, output) return } // ListTagsForResource API operation for AWS WAFV2. // // Retrieves the TagInfoForResource for the specified resource. Tags are key:value // pairs that you can use to categorize and manage your resources, for purposes // like billing. For example, you might set the tag key to "customer" and the // value to the customer name or ID. You can specify one or more tags to add // to each Amazon Web Services resource, up to 50 tags for a resource. // // You can tag the Amazon Web Services resources that you manage through WAF: // web ACLs, rule groups, IP sets, and regex pattern sets. You can't manage // or view tags through the WAF console. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation ListTagsForResource for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFTagOperationException // An error occurred during the tagging operation. Retry your request. // // * WAFTagOperationInternalErrorException // WAF couldn’t perform your tagging operation because of an internal error. // Retry your request. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListTagsForResource func (c *WAFV2) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { req, out := c.ListTagsForResourceRequest(input) return out, req.Send() } // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of // the ability to pass a context and additional request options. // // See ListTagsForResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { req, out := c.ListTagsForResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opListWebACLs = "ListWebACLs" // ListWebACLsRequest generates a "aws/request.Request" representing the // client's request for the ListWebACLs operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See ListWebACLs for more information on using the ListWebACLs // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the ListWebACLsRequest method. // req, resp := client.ListWebACLsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListWebACLs func (c *WAFV2) ListWebACLsRequest(input *ListWebACLsInput) (req *request.Request, output *ListWebACLsOutput) { op := &request.Operation{ Name: opListWebACLs, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListWebACLsInput{} } output = &ListWebACLsOutput{} req = c.newRequest(op, input, output) return } // ListWebACLs API operation for AWS WAFV2. // // Retrieves an array of WebACLSummary objects for the web ACLs that you manage. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation ListWebACLs for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListWebACLs func (c *WAFV2) ListWebACLs(input *ListWebACLsInput) (*ListWebACLsOutput, error) { req, out := c.ListWebACLsRequest(input) return out, req.Send() } // ListWebACLsWithContext is the same as ListWebACLs with the addition of // the ability to pass a context and additional request options. // // See ListWebACLs for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) ListWebACLsWithContext(ctx aws.Context, input *ListWebACLsInput, opts ...request.Option) (*ListWebACLsOutput, error) { req, out := c.ListWebACLsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutLoggingConfiguration = "PutLoggingConfiguration" // PutLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See PutLoggingConfiguration for more information on using the PutLoggingConfiguration // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the PutLoggingConfigurationRequest method. // req, resp := client.PutLoggingConfigurationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutLoggingConfiguration func (c *WAFV2) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInput) (req *request.Request, output *PutLoggingConfigurationOutput) { op := &request.Operation{ Name: opPutLoggingConfiguration, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutLoggingConfigurationInput{} } output = &PutLoggingConfigurationOutput{} req = c.newRequest(op, input, output) return } // PutLoggingConfiguration API operation for AWS WAFV2. // // Enables the specified LoggingConfiguration, to start logging from a web ACL, // according to the configuration provided. // // You can access information about all traffic that WAF inspects using the // following steps: // // Create an Amazon Kinesis Data Firehose. // // Create the data firehose with a PUT source and in the Region that you are // operating. If you are capturing logs for Amazon CloudFront, always create // the firehose in US East (N. Virginia). // // Give the data firehose a name that starts with the prefix aws-waf-logs-. // For example, aws-waf-logs-us-east-2-analytics. // // Do not create the data firehose using a Kinesis stream as your source. // // Associate that firehose to your web ACL using a PutLoggingConfiguration request. // // When you successfully enable logging using a PutLoggingConfiguration request, // WAF will create a service linked role with the necessary permissions to write // logs to the Amazon Kinesis Data Firehose. For more information, see Logging // Web ACL Traffic Information (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html) // in the WAF Developer Guide. // // This operation completely replaces the mutable specifications that you already // have for the logging configuration with the ones that you provide to this // call. To modify the logging configuration, retrieve it by calling GetLoggingConfiguration, // update the settings as needed, and then provide the complete logging configuration // specification to this call. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation PutLoggingConfiguration for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFServiceLinkedRoleErrorException // WAF is not able to access the service linked role. This can be caused by // a previous PutLoggingConfiguration request, which can lock the service linked // role for about 20 seconds. Please try your request again. The service linked // role can also be locked by a previous DeleteServiceLinkedRole request, which // can lock the role for 15 minutes or more. If you recently made a call to // DeleteServiceLinkedRole, wait at least 15 minutes and try the request again. // If you receive this same exception again, you will have to wait additional // time until the role is unlocked. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFInvalidOperationException // The operation isn't valid. // // * WAFLimitsExceededException // WAF couldn’t perform the operation because you exceeded your resource limit. // For example, the maximum number of WebACL objects that you can create for // an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutLoggingConfiguration func (c *WAFV2) PutLoggingConfiguration(input *PutLoggingConfigurationInput) (*PutLoggingConfigurationOutput, error) { req, out := c.PutLoggingConfigurationRequest(input) return out, req.Send() } // PutLoggingConfigurationWithContext is the same as PutLoggingConfiguration with the addition of // the ability to pass a context and additional request options. // // See PutLoggingConfiguration for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) PutLoggingConfigurationWithContext(ctx aws.Context, input *PutLoggingConfigurationInput, opts ...request.Option) (*PutLoggingConfigurationOutput, error) { req, out := c.PutLoggingConfigurationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opPutPermissionPolicy = "PutPermissionPolicy" // PutPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutPermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See PutPermissionPolicy for more information on using the PutPermissionPolicy // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the PutPermissionPolicyRequest method. // req, resp := client.PutPermissionPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutPermissionPolicy func (c *WAFV2) PutPermissionPolicyRequest(input *PutPermissionPolicyInput) (req *request.Request, output *PutPermissionPolicyOutput) { op := &request.Operation{ Name: opPutPermissionPolicy, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &PutPermissionPolicyInput{} } output = &PutPermissionPolicyOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // PutPermissionPolicy API operation for AWS WAFV2. // // Attaches an IAM policy to the specified resource. Use this to share a rule // group across accounts. // // You must be the owner of the rule group to perform this operation. // // This action is subject to the following restrictions: // // * You can attach only one policy with each PutPermissionPolicy request. // // * The ARN in the request must be a valid WAF RuleGroup ARN and the rule // group must exist in the same Region. // // * The user making the request must be the owner of the rule group. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation PutPermissionPolicy for usage and error information. // // Returned Error Types: // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFInvalidPermissionPolicyException // The operation failed because the specified policy isn't in the proper format. // // The policy specifications must conform to the following: // // * The policy must be composed using IAM Policy version 2012-10-17 or version // 2015-01-01. // // * The policy must include specifications for Effect, Action, and Principal. // // * Effect must specify Allow. // // * Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and wafv2:PutFirewallManagerRuleGroups. // WAF rejects any extra actions or wildcard actions in the policy. // // * The policy must not include a Resource parameter. // // For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html). // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutPermissionPolicy func (c *WAFV2) PutPermissionPolicy(input *PutPermissionPolicyInput) (*PutPermissionPolicyOutput, error) { req, out := c.PutPermissionPolicyRequest(input) return out, req.Send() } // PutPermissionPolicyWithContext is the same as PutPermissionPolicy with the addition of // the ability to pass a context and additional request options. // // See PutPermissionPolicy for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) PutPermissionPolicyWithContext(ctx aws.Context, input *PutPermissionPolicyInput, opts ...request.Option) (*PutPermissionPolicyOutput, error) { req, out := c.PutPermissionPolicyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See TagResource for more information on using the TagResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the TagResourceRequest method. // req, resp := client.TagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/TagResource func (c *WAFV2) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { op := &request.Operation{ Name: opTagResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &TagResourceInput{} } output = &TagResourceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // TagResource API operation for AWS WAFV2. // // Associates tags with the specified Amazon Web Services resource. Tags are // key:value pairs that you can use to categorize and manage your resources, // for purposes like billing. For example, you might set the tag key to "customer" // and the value to the customer name or ID. You can specify one or more tags // to add to each Amazon Web Services resource, up to 50 tags for a resource. // // You can tag the Amazon Web Services resources that you manage through WAF: // web ACLs, rule groups, IP sets, and regex pattern sets. You can't manage // or view tags through the WAF console. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation TagResource for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFLimitsExceededException // WAF couldn’t perform the operation because you exceeded your resource limit. // For example, the maximum number of WebACL objects that you can create for // an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFTagOperationException // An error occurred during the tagging operation. Retry your request. // // * WAFTagOperationInternalErrorException // WAF couldn’t perform your tagging operation because of an internal error. // Retry your request. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/TagResource func (c *WAFV2) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { req, out := c.TagResourceRequest(input) return out, req.Send() } // TagResourceWithContext is the same as TagResource with the addition of // the ability to pass a context and additional request options. // // See TagResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { req, out := c.TagResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UntagResource for more information on using the UntagResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the UntagResourceRequest method. // req, resp := client.UntagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UntagResource func (c *WAFV2) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { op := &request.Operation{ Name: opUntagResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UntagResourceInput{} } output = &UntagResourceOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // UntagResource API operation for AWS WAFV2. // // Disassociates tags from an Amazon Web Services resource. Tags are key:value // pairs that you can associate with Amazon Web Services resources. For example, // the tag key might be "customer" and the tag value might be "companyA." You // can specify one or more tags to add to each container. You can add up to // 50 tags to each Amazon Web Services resource. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation UntagResource for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFTagOperationException // An error occurred during the tagging operation. Retry your request. // // * WAFTagOperationInternalErrorException // WAF couldn’t perform your tagging operation because of an internal error. // Retry your request. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UntagResource func (c *WAFV2) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { req, out := c.UntagResourceRequest(input) return out, req.Send() } // UntagResourceWithContext is the same as UntagResource with the addition of // the ability to pass a context and additional request options. // // See UntagResource for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { req, out := c.UntagResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateIPSet = "UpdateIPSet" // UpdateIPSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateIPSet operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateIPSet for more information on using the UpdateIPSet // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the UpdateIPSetRequest method. // req, resp := client.UpdateIPSetRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateIPSet func (c *WAFV2) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, output *UpdateIPSetOutput) { op := &request.Operation{ Name: opUpdateIPSet, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateIPSetInput{} } output = &UpdateIPSetOutput{} req = c.newRequest(op, input, output) return } // UpdateIPSet API operation for AWS WAFV2. // // Updates the specified IPSet. // // This operation completely replaces the mutable specifications that you already // have for the IP set with the ones that you provide to this call. To modify // the IP set, retrieve it by calling GetIPSet, update the settings as needed, // and then provide the complete IP set specification to this call. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation UpdateIPSet for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFDuplicateItemException // WAF couldn’t perform the operation because the resource that you tried // to save is a duplicate of an existing one. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFLimitsExceededException // WAF couldn’t perform the operation because you exceeded your resource limit. // For example, the maximum number of WebACL objects that you can create for // an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateIPSet func (c *WAFV2) UpdateIPSet(input *UpdateIPSetInput) (*UpdateIPSetOutput, error) { req, out := c.UpdateIPSetRequest(input) return out, req.Send() } // UpdateIPSetWithContext is the same as UpdateIPSet with the addition of // the ability to pass a context and additional request options. // // See UpdateIPSet for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) UpdateIPSetWithContext(ctx aws.Context, input *UpdateIPSetInput, opts ...request.Option) (*UpdateIPSetOutput, error) { req, out := c.UpdateIPSetRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateRegexPatternSet = "UpdateRegexPatternSet" // UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateRegexPatternSet for more information on using the UpdateRegexPatternSet // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the UpdateRegexPatternSetRequest method. // req, resp := client.UpdateRegexPatternSetRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRegexPatternSet func (c *WAFV2) UpdateRegexPatternSetRequest(input *UpdateRegexPatternSetInput) (req *request.Request, output *UpdateRegexPatternSetOutput) { op := &request.Operation{ Name: opUpdateRegexPatternSet, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateRegexPatternSetInput{} } output = &UpdateRegexPatternSetOutput{} req = c.newRequest(op, input, output) return } // UpdateRegexPatternSet API operation for AWS WAFV2. // // Updates the specified RegexPatternSet. // // This operation completely replaces the mutable specifications that you already // have for the regex pattern set with the ones that you provide to this call. // To modify the regex pattern set, retrieve it by calling GetRegexPatternSet, // update the settings as needed, and then provide the complete regex pattern // set specification to this call. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation UpdateRegexPatternSet for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFDuplicateItemException // WAF couldn’t perform the operation because the resource that you tried // to save is a duplicate of an existing one. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFLimitsExceededException // WAF couldn’t perform the operation because you exceeded your resource limit. // For example, the maximum number of WebACL objects that you can create for // an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRegexPatternSet func (c *WAFV2) UpdateRegexPatternSet(input *UpdateRegexPatternSetInput) (*UpdateRegexPatternSetOutput, error) { req, out := c.UpdateRegexPatternSetRequest(input) return out, req.Send() } // UpdateRegexPatternSetWithContext is the same as UpdateRegexPatternSet with the addition of // the ability to pass a context and additional request options. // // See UpdateRegexPatternSet for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) UpdateRegexPatternSetWithContext(ctx aws.Context, input *UpdateRegexPatternSetInput, opts ...request.Option) (*UpdateRegexPatternSetOutput, error) { req, out := c.UpdateRegexPatternSetRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateRuleGroup = "UpdateRuleGroup" // UpdateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateRuleGroup for more information on using the UpdateRuleGroup // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the UpdateRuleGroupRequest method. // req, resp := client.UpdateRuleGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRuleGroup func (c *WAFV2) UpdateRuleGroupRequest(input *UpdateRuleGroupInput) (req *request.Request, output *UpdateRuleGroupOutput) { op := &request.Operation{ Name: opUpdateRuleGroup, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateRuleGroupInput{} } output = &UpdateRuleGroupOutput{} req = c.newRequest(op, input, output) return } // UpdateRuleGroup API operation for AWS WAFV2. // // Updates the specified RuleGroup. // // This operation completely replaces the mutable specifications that you already // have for the rule group with the ones that you provide to this call. To modify // the rule group, retrieve it by calling GetRuleGroup, update the settings // as needed, and then provide the complete rule group specification to this // call. // // A rule group defines a collection of rules to inspect and control web requests // that you can use in a WebACL. When you create a rule group, you define an // immutable capacity limit. If you update a rule group, you must stay within // the capacity. This allows others to reuse the rule group with confidence // in its capacity requirements. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation UpdateRuleGroup for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFDuplicateItemException // WAF couldn’t perform the operation because the resource that you tried // to save is a duplicate of an existing one. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFLimitsExceededException // WAF couldn’t perform the operation because you exceeded your resource limit. // For example, the maximum number of WebACL objects that you can create for // an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide. // // * WAFUnavailableEntityException // WAF couldn’t retrieve the resource that you requested. Retry your request. // // * WAFSubscriptionNotFoundException // You tried to use a managed rule group that's available by subscription, but // you aren't subscribed to it yet. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRuleGroup func (c *WAFV2) UpdateRuleGroup(input *UpdateRuleGroupInput) (*UpdateRuleGroupOutput, error) { req, out := c.UpdateRuleGroupRequest(input) return out, req.Send() } // UpdateRuleGroupWithContext is the same as UpdateRuleGroup with the addition of // the ability to pass a context and additional request options. // // See UpdateRuleGroup for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) UpdateRuleGroupWithContext(ctx aws.Context, input *UpdateRuleGroupInput, opts ...request.Option) (*UpdateRuleGroupOutput, error) { req, out := c.UpdateRuleGroupRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } const opUpdateWebACL = "UpdateWebACL" // UpdateWebACLRequest generates a "aws/request.Request" representing the // client's request for the UpdateWebACL operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // // See UpdateWebACL for more information on using the UpdateWebACL // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // // // Example sending a request using the UpdateWebACLRequest method. // req, resp := client.UpdateWebACLRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateWebACL func (c *WAFV2) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Request, output *UpdateWebACLOutput) { op := &request.Operation{ Name: opUpdateWebACL, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &UpdateWebACLInput{} } output = &UpdateWebACLOutput{} req = c.newRequest(op, input, output) return } // UpdateWebACL API operation for AWS WAFV2. // // Updates the specified WebACL. // // This operation completely replaces the mutable specifications that you already // have for the web ACL with the ones that you provide to this call. To modify // the web ACL, retrieve it by calling GetWebACL, update the settings as needed, // and then provide the complete web ACL specification to this call. // // A web ACL defines a collection of rules to use to inspect and control web // requests. Each rule has an action defined (allow, block, or count) for requests // that match the statement of the rule. In the web ACL, you assign a default // action to take (allow, block) for any request that does not match any of // the rules. The rules in a web ACL can be a combination of the types Rule, // RuleGroup, and managed rule group. You can associate a web ACL with one or // more Amazon Web Services resources to protect. The resources can be an Amazon // CloudFront distribution, an Amazon API Gateway REST API, an Application Load // Balancer, or an AppSync GraphQL API. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS WAFV2's // API operation UpdateWebACL for usage and error information. // // Returned Error Types: // * WAFInternalErrorException // Your request is valid, but WAF couldn’t perform the operation because of // a system problem. Retry your request. // // * WAFInvalidParameterException // The operation failed because WAF didn't recognize a parameter in the request. // For example: // // * You specified a parameter name or value that isn't valid. // // * Your nested statement isn't valid. You might have tried to nest a statement // that can’t be nested. // // * You tried to update a WebACL with a DefaultAction that isn't among the // types available at DefaultAction. // // * Your request references an ARN that is malformed, or corresponds to // a resource with which a web ACL can't be associated. // // * WAFNonexistentItemException // WAF couldn’t perform the operation because your resource doesn’t exist. // // * WAFDuplicateItemException // WAF couldn’t perform the operation because the resource that you tried // to save is a duplicate of an existing one. // // * WAFOptimisticLockException // WAF couldn’t save your changes because you tried to update or delete a // resource that has changed since you last retrieved it. Get the resource again, // make any changes you need to make to the new copy, and retry your operation. // // * WAFLimitsExceededException // WAF couldn’t perform the operation because you exceeded your resource limit. // For example, the maximum number of WebACL objects that you can create for // an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide. // // * WAFInvalidResourceException // WAF couldn’t perform the operation because the resource that you requested // isn’t valid. Check the resource, and try again. // // * WAFUnavailableEntityException // WAF couldn’t retrieve the resource that you requested. Retry your request. // // * WAFSubscriptionNotFoundException // You tried to use a managed rule group that's available by subscription, but // you aren't subscribed to it yet. // // * WAFInvalidOperationException // The operation isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateWebACL func (c *WAFV2) UpdateWebACL(input *UpdateWebACLInput) (*UpdateWebACLOutput, error) { req, out := c.UpdateWebACLRequest(input) return out, req.Send() } // UpdateWebACLWithContext is the same as UpdateWebACL with the addition of // the ability to pass a context and additional request options. // // See UpdateWebACL for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. func (c *WAFV2) UpdateWebACLWithContext(ctx aws.Context, input *UpdateWebACLInput, opts ...request.Option) (*UpdateWebACLOutput, error) { req, out := c.UpdateWebACLRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } // A single action condition for a Condition in a logging filter. type ActionCondition struct { _ struct{} `type:"structure"` // The action setting that a log record must contain in order to meet the condition. // // Action is a required field Action *string `type:"string" required:"true" enum:"ActionValue"` } // String returns the string representation func (s ActionCondition) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ActionCondition) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ActionCondition) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ActionCondition"} if s.Action == nil { invalidParams.Add(request.NewErrParamRequired("Action")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAction sets the Action field's value. func (s *ActionCondition) SetAction(v string) *ActionCondition { s.Action = &v return s } // Inspect all of the elements that WAF has parsed and extracted from the web // request JSON body that are within the JsonBody MatchScope. This is used with // the FieldToMatch option JsonBody. // // This is used only to indicate the web request component for WAF to inspect, // in the FieldToMatch specification. type All struct { _ struct{} `type:"structure"` } // String returns the string representation func (s All) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s All) GoString() string { return s.String() } // All query arguments of a web request. // // This is used only to indicate the web request component for WAF to inspect, // in the FieldToMatch specification. type AllQueryArguments struct { _ struct{} `type:"structure"` } // String returns the string representation func (s AllQueryArguments) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s AllQueryArguments) GoString() string { return s.String() } // Specifies that WAF should allow the request and optionally defines additional // custom handling for the request. // // This is used in the context of other settings, for example to specify values // for RuleAction and web ACL DefaultAction. type AllowAction struct { _ struct{} `type:"structure"` // Defines custom handling for the web request. // // For information about customizing web requests and responses, see Customizing // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). CustomRequestHandling *CustomRequestHandling `type:"structure"` } // String returns the string representation func (s AllowAction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s AllowAction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AllowAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AllowAction"} if s.CustomRequestHandling != nil { if err := s.CustomRequestHandling.Validate(); err != nil { invalidParams.AddNested("CustomRequestHandling", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetCustomRequestHandling sets the CustomRequestHandling field's value. func (s *AllowAction) SetCustomRequestHandling(v *CustomRequestHandling) *AllowAction { s.CustomRequestHandling = v return s } // A logical rule statement used to combine other rule statements with AND logic. // You provide more than one Statement within the AndStatement. type AndStatement struct { _ struct{} `type:"structure"` // The statements to combine with AND logic. You can use any statements that // can be nested. // // Statements is a required field Statements []*Statement `type:"list" required:"true"` } // String returns the string representation func (s AndStatement) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s AndStatement) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AndStatement) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AndStatement"} if s.Statements == nil { invalidParams.Add(request.NewErrParamRequired("Statements")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetStatements sets the Statements field's value. func (s *AndStatement) SetStatements(v []*Statement) *AndStatement { s.Statements = v return s } type AssociateWebACLInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the resource to associate with the web // ACL. // // The ARN must be in one of the following formats: // // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id // // * For an Amazon API Gateway REST API: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name // // * For an AppSync GraphQL API: arn:aws:appsync:region:account-id:apis/GraphQLApiId // // ResourceArn is a required field ResourceArn *string `min:"20" type:"string" required:"true"` // The Amazon Resource Name (ARN) of the web ACL that you want to associate // with the resource. // // WebACLArn is a required field WebACLArn *string `min:"20" type:"string" required:"true"` } // String returns the string representation func (s AssociateWebACLInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s AssociateWebACLInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *AssociateWebACLInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AssociateWebACLInput"} if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } if s.ResourceArn != nil && len(*s.ResourceArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20)) } if s.WebACLArn == nil { invalidParams.Add(request.NewErrParamRequired("WebACLArn")) } if s.WebACLArn != nil && len(*s.WebACLArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("WebACLArn", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceArn sets the ResourceArn field's value. func (s *AssociateWebACLInput) SetResourceArn(v string) *AssociateWebACLInput { s.ResourceArn = &v return s } // SetWebACLArn sets the WebACLArn field's value. func (s *AssociateWebACLInput) SetWebACLArn(v string) *AssociateWebACLInput { s.WebACLArn = &v return s } type AssociateWebACLOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s AssociateWebACLOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s AssociateWebACLOutput) GoString() string { return s.String() } // Specifies that WAF should block the request and optionally defines additional // custom handling for the response to the web request. // // This is used in the context of other settings, for example to specify values // for RuleAction and web ACL DefaultAction. type BlockAction struct { _ struct{} `type:"structure"` // Defines a custom response for the web request. // // For information about customizing web requests and responses, see Customizing // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). CustomResponse *CustomResponse `type:"structure"` } // String returns the string representation func (s BlockAction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s BlockAction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *BlockAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "BlockAction"} if s.CustomResponse != nil { if err := s.CustomResponse.Validate(); err != nil { invalidParams.AddNested("CustomResponse", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetCustomResponse sets the CustomResponse field's value. func (s *BlockAction) SetCustomResponse(v *CustomResponse) *BlockAction { s.CustomResponse = v return s } // The body of a web request. This immediately follows the request headers. // // This is used only to indicate the web request component for WAF to inspect, // in the FieldToMatch specification. type Body struct { _ struct{} `type:"structure"` } // String returns the string representation func (s Body) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s Body) GoString() string { return s.String() } // A rule statement that defines a string match search for WAF to apply to web // requests. The byte match statement provides the bytes to search for, the // location in requests that you want WAF to search, and other settings. The // bytes to search for are typically a string that corresponds with ASCII characters. // In the WAF console and the developer guide, this is refered to as a string // match statement. type ByteMatchStatement struct { _ struct{} `type:"structure"` // The part of a web request that you want WAF to inspect. For more information, // see FieldToMatch. // // FieldToMatch is a required field FieldToMatch *FieldToMatch `type:"structure" required:"true"` // The area within the portion of a web request that you want WAF to search // for SearchString. Valid values include the following: // // CONTAINS // // The specified part of the web request must include the value of SearchString, // but the location doesn't matter. // // CONTAINS_WORD // // The specified part of the web request must include the value of SearchString, // and SearchString must contain only alphanumeric characters or underscore // (A-Z, a-z, 0-9, or _). In addition, SearchString must be a word, which means // that both of the following are true: // // * SearchString is at the beginning of the specified part of the web request // or is preceded by a character other than an alphanumeric character or // underscore (_). Examples include the value of a header and ;BadBot. // // * SearchString is at the end of the specified part of the web request // or is followed by a character other than an alphanumeric character or // underscore (_), for example, BadBot; and -BadBot;. // // EXACTLY // // The value of the specified part of the web request must exactly match the // value of SearchString. // // STARTS_WITH // // The value of SearchString must appear at the beginning of the specified part // of the web request. // // ENDS_WITH // // The value of SearchString must appear at the end of the specified part of // the web request. // // PositionalConstraint is a required field PositionalConstraint *string `type:"string" required:"true" enum:"PositionalConstraint"` // A string value that you want WAF to search for. WAF searches only in the // part of web requests that you designate for inspection in FieldToMatch. The // maximum length of the value is 50 bytes. // // Valid values depend on the component that you specify for inspection in FieldToMatch: // // * Method: The HTTP method that you want WAF to search for. This indicates // the type of operation specified in the request. // // * UriPath: The value that you want WAF to search for in the URI path, // for example, /images/daily-ad.jpg. // // If SearchString includes alphabetic characters A-Z and a-z, note that the // value is case sensitive. // // If you're using the WAF API // // Specify a base64-encoded version of the value. The maximum length of the // value before you base64-encode it is 50 bytes. // // For example, suppose the value of Type is HEADER and the value of Data is // User-Agent. If you want to search the User-Agent header for the value BadBot, // you base64-encode BadBot using MIME base64-encoding and include the resulting // value, QmFkQm90, in the value of SearchString. // // If you're using the CLI or one of the Amazon Web Services SDKs // // The value that you want WAF to search for. The SDK automatically base64 encodes // the value. // // SearchString is automatically base64 encoded/decoded by the SDK. // // SearchString is a required field SearchString []byte `type:"blob" required:"true"` // Text transformations eliminate some of the unusual formatting that attackers // use in web requests in an effort to bypass detection. If you specify one // or more transformations in a rule statement, WAF performs all transformations // on the content of the request component identified by FieldToMatch, starting // from the lowest priority setting, before inspecting the content for a match. // // TextTransformations is a required field TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"` } // String returns the string representation func (s ByteMatchStatement) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s ByteMatchStatement) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *ByteMatchStatement) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ByteMatchStatement"} if s.FieldToMatch == nil { invalidParams.Add(request.NewErrParamRequired("FieldToMatch")) } if s.PositionalConstraint == nil { invalidParams.Add(request.NewErrParamRequired("PositionalConstraint")) } if s.SearchString == nil { invalidParams.Add(request.NewErrParamRequired("SearchString")) } if s.TextTransformations == nil { invalidParams.Add(request.NewErrParamRequired("TextTransformations")) } if s.TextTransformations != nil && len(s.TextTransformations) < 1 { invalidParams.Add(request.NewErrParamMinLen("TextTransformations", 1)) } if s.FieldToMatch != nil { if err := s.FieldToMatch.Validate(); err != nil { invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams)) } } if s.TextTransformations != nil { for i, v := range s.TextTransformations { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TextTransformations", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetFieldToMatch sets the FieldToMatch field's value. func (s *ByteMatchStatement) SetFieldToMatch(v *FieldToMatch) *ByteMatchStatement { s.FieldToMatch = v return s } // SetPositionalConstraint sets the PositionalConstraint field's value. func (s *ByteMatchStatement) SetPositionalConstraint(v string) *ByteMatchStatement { s.PositionalConstraint = &v return s } // SetSearchString sets the SearchString field's value. func (s *ByteMatchStatement) SetSearchString(v []byte) *ByteMatchStatement { s.SearchString = v return s } // SetTextTransformations sets the TextTransformations field's value. func (s *ByteMatchStatement) SetTextTransformations(v []*TextTransformation) *ByteMatchStatement { s.TextTransformations = v return s } type CheckCapacityInput struct { _ struct{} `type:"structure"` // An array of Rule that you're configuring to use in a rule group or web ACL. // // Rules is a required field Rules []*Rule `type:"list" required:"true"` // Specifies whether this is for an Amazon CloudFront distribution or for a // regional application. A regional application can be an Application Load Balancer // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. // // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. // // Scope is a required field Scope *string `type:"string" required:"true" enum:"Scope"` } // String returns the string representation func (s CheckCapacityInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CheckCapacityInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CheckCapacityInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CheckCapacityInput"} if s.Rules == nil { invalidParams.Add(request.NewErrParamRequired("Rules")) } if s.Scope == nil { invalidParams.Add(request.NewErrParamRequired("Scope")) } if s.Rules != nil { for i, v := range s.Rules { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetRules sets the Rules field's value. func (s *CheckCapacityInput) SetRules(v []*Rule) *CheckCapacityInput { s.Rules = v return s } // SetScope sets the Scope field's value. func (s *CheckCapacityInput) SetScope(v string) *CheckCapacityInput { s.Scope = &v return s } type CheckCapacityOutput struct { _ struct{} `type:"structure"` // The capacity required by the rules and scope. Capacity *int64 `type:"long"` } // String returns the string representation func (s CheckCapacityOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CheckCapacityOutput) GoString() string { return s.String() } // SetCapacity sets the Capacity field's value. func (s *CheckCapacityOutput) SetCapacity(v int64) *CheckCapacityOutput { s.Capacity = &v return s } // A single match condition for a Filter. type Condition struct { _ struct{} `type:"structure"` // A single action condition. ActionCondition *ActionCondition `type:"structure"` // A single label name condition. LabelNameCondition *LabelNameCondition `type:"structure"` } // String returns the string representation func (s Condition) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s Condition) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *Condition) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Condition"} if s.ActionCondition != nil { if err := s.ActionCondition.Validate(); err != nil { invalidParams.AddNested("ActionCondition", err.(request.ErrInvalidParams)) } } if s.LabelNameCondition != nil { if err := s.LabelNameCondition.Validate(); err != nil { invalidParams.AddNested("LabelNameCondition", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetActionCondition sets the ActionCondition field's value. func (s *Condition) SetActionCondition(v *ActionCondition) *Condition { s.ActionCondition = v return s } // SetLabelNameCondition sets the LabelNameCondition field's value. func (s *Condition) SetLabelNameCondition(v *LabelNameCondition) *Condition { s.LabelNameCondition = v return s } // Specifies that WAF should count the request. Optionally defines additional // custom handling for the request. // // This is used in the context of other settings, for example to specify values // for RuleAction and web ACL DefaultAction. type CountAction struct { _ struct{} `type:"structure"` // Defines custom handling for the web request. // // For information about customizing web requests and responses, see Customizing // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). CustomRequestHandling *CustomRequestHandling `type:"structure"` } // String returns the string representation func (s CountAction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CountAction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CountAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CountAction"} if s.CustomRequestHandling != nil { if err := s.CustomRequestHandling.Validate(); err != nil { invalidParams.AddNested("CustomRequestHandling", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetCustomRequestHandling sets the CustomRequestHandling field's value. func (s *CountAction) SetCustomRequestHandling(v *CustomRequestHandling) *CountAction { s.CustomRequestHandling = v return s } type CreateIPSetInput struct { _ struct{} `type:"structure"` // Contains an array of strings that specify one or more IP addresses or blocks // of IP addresses in Classless Inter-Domain Routing (CIDR) notation. WAF supports // all IPv4 and IPv6 CIDR ranges except for /0. // // Examples: // // * To configure WAF to allow, block, or count requests that originated // from the IP address 192.0.2.44, specify 192.0.2.44/32. // // * To configure WAF to allow, block, or count requests that originated // from IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24. // // * To configure WAF to allow, block, or count requests that originated // from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128. // // * To configure WAF to allow, block, or count requests that originated // from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, // specify 1111:0000:0000:0000:0000:0000:0000:0000/64. // // For more information about CIDR notation, see the Wikipedia entry Classless // Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). // // Addresses is a required field Addresses []*string `type:"list" required:"true"` // A description of the IP set that helps with identification. Description *string `min:"1" type:"string"` // Specify IPV4 or IPV6. // // IPAddressVersion is a required field IPAddressVersion *string `type:"string" required:"true" enum:"IPAddressVersion"` // The name of the IP set. You cannot change the name of an IPSet after you // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // Specifies whether this is for an Amazon CloudFront distribution or for a // regional application. A regional application can be an Application Load Balancer // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. // // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. // // Scope is a required field Scope *string `type:"string" required:"true" enum:"Scope"` // An array of key:value pairs to associate with the resource. Tags []*Tag `min:"1" type:"list"` } // String returns the string representation func (s CreateIPSetInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CreateIPSetInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateIPSetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateIPSetInput"} if s.Addresses == nil { invalidParams.Add(request.NewErrParamRequired("Addresses")) } if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } if s.IPAddressVersion == nil { invalidParams.Add(request.NewErrParamRequired("IPAddressVersion")) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if s.Scope == nil { invalidParams.Add(request.NewErrParamRequired("Scope")) } if s.Tags != nil && len(s.Tags) < 1 { invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) } if s.Tags != nil { for i, v := range s.Tags { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAddresses sets the Addresses field's value. func (s *CreateIPSetInput) SetAddresses(v []*string) *CreateIPSetInput { s.Addresses = v return s } // SetDescription sets the Description field's value. func (s *CreateIPSetInput) SetDescription(v string) *CreateIPSetInput { s.Description = &v return s } // SetIPAddressVersion sets the IPAddressVersion field's value. func (s *CreateIPSetInput) SetIPAddressVersion(v string) *CreateIPSetInput { s.IPAddressVersion = &v return s } // SetName sets the Name field's value. func (s *CreateIPSetInput) SetName(v string) *CreateIPSetInput { s.Name = &v return s } // SetScope sets the Scope field's value. func (s *CreateIPSetInput) SetScope(v string) *CreateIPSetInput { s.Scope = &v return s } // SetTags sets the Tags field's value. func (s *CreateIPSetInput) SetTags(v []*Tag) *CreateIPSetInput { s.Tags = v return s } type CreateIPSetOutput struct { _ struct{} `type:"structure"` // High-level information about an IPSet, returned by operations like create // and list. This provides information like the ID, that you can use to retrieve // and manage an IPSet, and the ARN, that you provide to the IPSetReferenceStatement // to use the address set in a Rule. Summary *IPSetSummary `type:"structure"` } // String returns the string representation func (s CreateIPSetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CreateIPSetOutput) GoString() string { return s.String() } // SetSummary sets the Summary field's value. func (s *CreateIPSetOutput) SetSummary(v *IPSetSummary) *CreateIPSetOutput { s.Summary = v return s } type CreateRegexPatternSetInput struct { _ struct{} `type:"structure"` // A description of the set that helps with identification. Description *string `min:"1" type:"string"` // The name of the set. You cannot change the name after you create the set. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // Array of regular expression strings. // // RegularExpressionList is a required field RegularExpressionList []*Regex `type:"list" required:"true"` // Specifies whether this is for an Amazon CloudFront distribution or for a // regional application. A regional application can be an Application Load Balancer // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. // // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. // // Scope is a required field Scope *string `type:"string" required:"true" enum:"Scope"` // An array of key:value pairs to associate with the resource. Tags []*Tag `min:"1" type:"list"` } // String returns the string representation func (s CreateRegexPatternSetInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CreateRegexPatternSetInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateRegexPatternSetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateRegexPatternSetInput"} if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if s.RegularExpressionList == nil { invalidParams.Add(request.NewErrParamRequired("RegularExpressionList")) } if s.Scope == nil { invalidParams.Add(request.NewErrParamRequired("Scope")) } if s.Tags != nil && len(s.Tags) < 1 { invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) } if s.RegularExpressionList != nil { for i, v := range s.RegularExpressionList { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RegularExpressionList", i), err.(request.ErrInvalidParams)) } } } if s.Tags != nil { for i, v := range s.Tags { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetDescription sets the Description field's value. func (s *CreateRegexPatternSetInput) SetDescription(v string) *CreateRegexPatternSetInput { s.Description = &v return s } // SetName sets the Name field's value. func (s *CreateRegexPatternSetInput) SetName(v string) *CreateRegexPatternSetInput { s.Name = &v return s } // SetRegularExpressionList sets the RegularExpressionList field's value. func (s *CreateRegexPatternSetInput) SetRegularExpressionList(v []*Regex) *CreateRegexPatternSetInput { s.RegularExpressionList = v return s } // SetScope sets the Scope field's value. func (s *CreateRegexPatternSetInput) SetScope(v string) *CreateRegexPatternSetInput { s.Scope = &v return s } // SetTags sets the Tags field's value. func (s *CreateRegexPatternSetInput) SetTags(v []*Tag) *CreateRegexPatternSetInput { s.Tags = v return s } type CreateRegexPatternSetOutput struct { _ struct{} `type:"structure"` // High-level information about a RegexPatternSet, returned by operations like // create and list. This provides information like the ID, that you can use // to retrieve and manage a RegexPatternSet, and the ARN, that you provide to // the RegexPatternSetReferenceStatement to use the pattern set in a Rule. Summary *RegexPatternSetSummary `type:"structure"` } // String returns the string representation func (s CreateRegexPatternSetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CreateRegexPatternSetOutput) GoString() string { return s.String() } // SetSummary sets the Summary field's value. func (s *CreateRegexPatternSetOutput) SetSummary(v *RegexPatternSetSummary) *CreateRegexPatternSetOutput { s.Summary = v return s } type CreateRuleGroupInput struct { _ struct{} `type:"structure"` // The web ACL capacity units (WCUs) required for this rule group. // // When you create your own rule group, you define this, and you cannot change // it after creation. When you add or modify the rules in a rule group, WAF // enforces this limit. You can check the capacity for a set of rules using // CheckCapacity. // // WAF uses WCUs to calculate and control the operating resources that are used // to run your rules, rule groups, and web ACLs. WAF calculates capacity differently // for each rule type, to reflect the relative cost of each rule. Simple rules // that cost little to run use fewer WCUs than more complex rules that use more // processing power. Rule group capacity is fixed at creation, which helps users // plan their web ACL WCU usage when they use a rule group. The WCU limit for // web ACLs is 1,500. // // Capacity is a required field Capacity *int64 `min:"1" type:"long" required:"true"` // A map of custom response keys and content bodies. When you create a rule // with a block action, you can send a custom response to the web request. You // define these for the rule group, and then use them in the rules that you // define in the rule group. // // For information about customizing web requests and responses, see Customizing // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). // // For information about the limits on count and size for custom request and // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). CustomResponseBodies map[string]*CustomResponseBody `min:"1" type:"map"` // A description of the rule group that helps with identification. Description *string `min:"1" type:"string"` // The name of the rule group. You cannot change the name of a rule group after // you create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // The Rule statements used to identify the web requests that you want to allow, // block, or count. Each rule includes one top-level statement that WAF uses // to identify matching web requests, and parameters that govern how WAF handles // them. Rules []*Rule `type:"list"` // Specifies whether this is for an Amazon CloudFront distribution or for a // regional application. A regional application can be an Application Load Balancer // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. // // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. // // Scope is a required field Scope *string `type:"string" required:"true" enum:"Scope"` // An array of key:value pairs to associate with the resource. Tags []*Tag `min:"1" type:"list"` // Defines and enables Amazon CloudWatch metrics and web request sample collection. // // VisibilityConfig is a required field VisibilityConfig *VisibilityConfig `type:"structure" required:"true"` } // String returns the string representation func (s CreateRuleGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CreateRuleGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateRuleGroupInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateRuleGroupInput"} if s.Capacity == nil { invalidParams.Add(request.NewErrParamRequired("Capacity")) } if s.Capacity != nil && *s.Capacity < 1 { invalidParams.Add(request.NewErrParamMinValue("Capacity", 1)) } if s.CustomResponseBodies != nil && len(s.CustomResponseBodies) < 1 { invalidParams.Add(request.NewErrParamMinLen("CustomResponseBodies", 1)) } if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if s.Scope == nil { invalidParams.Add(request.NewErrParamRequired("Scope")) } if s.Tags != nil && len(s.Tags) < 1 { invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) } if s.VisibilityConfig == nil { invalidParams.Add(request.NewErrParamRequired("VisibilityConfig")) } if s.CustomResponseBodies != nil { for i, v := range s.CustomResponseBodies { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CustomResponseBodies", i), err.(request.ErrInvalidParams)) } } } if s.Rules != nil { for i, v := range s.Rules { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) } } } if s.Tags != nil { for i, v := range s.Tags { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) } } } if s.VisibilityConfig != nil { if err := s.VisibilityConfig.Validate(); err != nil { invalidParams.AddNested("VisibilityConfig", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetCapacity sets the Capacity field's value. func (s *CreateRuleGroupInput) SetCapacity(v int64) *CreateRuleGroupInput { s.Capacity = &v return s } // SetCustomResponseBodies sets the CustomResponseBodies field's value. func (s *CreateRuleGroupInput) SetCustomResponseBodies(v map[string]*CustomResponseBody) *CreateRuleGroupInput { s.CustomResponseBodies = v return s } // SetDescription sets the Description field's value. func (s *CreateRuleGroupInput) SetDescription(v string) *CreateRuleGroupInput { s.Description = &v return s } // SetName sets the Name field's value. func (s *CreateRuleGroupInput) SetName(v string) *CreateRuleGroupInput { s.Name = &v return s } // SetRules sets the Rules field's value. func (s *CreateRuleGroupInput) SetRules(v []*Rule) *CreateRuleGroupInput { s.Rules = v return s } // SetScope sets the Scope field's value. func (s *CreateRuleGroupInput) SetScope(v string) *CreateRuleGroupInput { s.Scope = &v return s } // SetTags sets the Tags field's value. func (s *CreateRuleGroupInput) SetTags(v []*Tag) *CreateRuleGroupInput { s.Tags = v return s } // SetVisibilityConfig sets the VisibilityConfig field's value. func (s *CreateRuleGroupInput) SetVisibilityConfig(v *VisibilityConfig) *CreateRuleGroupInput { s.VisibilityConfig = v return s } type CreateRuleGroupOutput struct { _ struct{} `type:"structure"` // High-level information about a RuleGroup, returned by operations like create // and list. This provides information like the ID, that you can use to retrieve // and manage a RuleGroup, and the ARN, that you provide to the RuleGroupReferenceStatement // to use the rule group in a Rule. Summary *RuleGroupSummary `type:"structure"` } // String returns the string representation func (s CreateRuleGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CreateRuleGroupOutput) GoString() string { return s.String() } // SetSummary sets the Summary field's value. func (s *CreateRuleGroupOutput) SetSummary(v *RuleGroupSummary) *CreateRuleGroupOutput { s.Summary = v return s } type CreateWebACLInput struct { _ struct{} `type:"structure"` // A map of custom response keys and content bodies. When you create a rule // with a block action, you can send a custom response to the web request. You // define these for the web ACL, and then use them in the rules and default // actions that you define in the web ACL. // // For information about customizing web requests and responses, see Customizing // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). // // For information about the limits on count and size for custom request and // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). CustomResponseBodies map[string]*CustomResponseBody `min:"1" type:"map"` // The action to perform if none of the Rules contained in the WebACL match. // // DefaultAction is a required field DefaultAction *DefaultAction `type:"structure" required:"true"` // A description of the web ACL that helps with identification. Description *string `min:"1" type:"string"` // The name of the web ACL. You cannot change the name of a web ACL after you // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // The Rule statements used to identify the web requests that you want to allow, // block, or count. Each rule includes one top-level statement that WAF uses // to identify matching web requests, and parameters that govern how WAF handles // them. Rules []*Rule `type:"list"` // Specifies whether this is for an Amazon CloudFront distribution or for a // regional application. A regional application can be an Application Load Balancer // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. // // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. // // Scope is a required field Scope *string `type:"string" required:"true" enum:"Scope"` // An array of key:value pairs to associate with the resource. Tags []*Tag `min:"1" type:"list"` // Defines and enables Amazon CloudWatch metrics and web request sample collection. // // VisibilityConfig is a required field VisibilityConfig *VisibilityConfig `type:"structure" required:"true"` } // String returns the string representation func (s CreateWebACLInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CreateWebACLInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CreateWebACLInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateWebACLInput"} if s.CustomResponseBodies != nil && len(s.CustomResponseBodies) < 1 { invalidParams.Add(request.NewErrParamMinLen("CustomResponseBodies", 1)) } if s.DefaultAction == nil { invalidParams.Add(request.NewErrParamRequired("DefaultAction")) } if s.Description != nil && len(*s.Description) < 1 { invalidParams.Add(request.NewErrParamMinLen("Description", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if s.Scope == nil { invalidParams.Add(request.NewErrParamRequired("Scope")) } if s.Tags != nil && len(s.Tags) < 1 { invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) } if s.VisibilityConfig == nil { invalidParams.Add(request.NewErrParamRequired("VisibilityConfig")) } if s.CustomResponseBodies != nil { for i, v := range s.CustomResponseBodies { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CustomResponseBodies", i), err.(request.ErrInvalidParams)) } } } if s.DefaultAction != nil { if err := s.DefaultAction.Validate(); err != nil { invalidParams.AddNested("DefaultAction", err.(request.ErrInvalidParams)) } } if s.Rules != nil { for i, v := range s.Rules { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) } } } if s.Tags != nil { for i, v := range s.Tags { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) } } } if s.VisibilityConfig != nil { if err := s.VisibilityConfig.Validate(); err != nil { invalidParams.AddNested("VisibilityConfig", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetCustomResponseBodies sets the CustomResponseBodies field's value. func (s *CreateWebACLInput) SetCustomResponseBodies(v map[string]*CustomResponseBody) *CreateWebACLInput { s.CustomResponseBodies = v return s } // SetDefaultAction sets the DefaultAction field's value. func (s *CreateWebACLInput) SetDefaultAction(v *DefaultAction) *CreateWebACLInput { s.DefaultAction = v return s } // SetDescription sets the Description field's value. func (s *CreateWebACLInput) SetDescription(v string) *CreateWebACLInput { s.Description = &v return s } // SetName sets the Name field's value. func (s *CreateWebACLInput) SetName(v string) *CreateWebACLInput { s.Name = &v return s } // SetRules sets the Rules field's value. func (s *CreateWebACLInput) SetRules(v []*Rule) *CreateWebACLInput { s.Rules = v return s } // SetScope sets the Scope field's value. func (s *CreateWebACLInput) SetScope(v string) *CreateWebACLInput { s.Scope = &v return s } // SetTags sets the Tags field's value. func (s *CreateWebACLInput) SetTags(v []*Tag) *CreateWebACLInput { s.Tags = v return s } // SetVisibilityConfig sets the VisibilityConfig field's value. func (s *CreateWebACLInput) SetVisibilityConfig(v *VisibilityConfig) *CreateWebACLInput { s.VisibilityConfig = v return s } type CreateWebACLOutput struct { _ struct{} `type:"structure"` // High-level information about a WebACL, returned by operations like create // and list. This provides information like the ID, that you can use to retrieve // and manage a WebACL, and the ARN, that you provide to operations like AssociateWebACL. Summary *WebACLSummary `type:"structure"` } // String returns the string representation func (s CreateWebACLOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CreateWebACLOutput) GoString() string { return s.String() } // SetSummary sets the Summary field's value. func (s *CreateWebACLOutput) SetSummary(v *WebACLSummary) *CreateWebACLOutput { s.Summary = v return s } // A custom header for custom request and response handling. This is used in // CustomResponse and CustomRequestHandling. type CustomHTTPHeader struct { _ struct{} `type:"structure"` // The name of the custom header. // // For custom request header insertion, when WAF inserts the header into the // request, it prefixes this name x-amzn-waf-, to avoid confusion with the headers // that are already in the request. For example, for the header name sample, // WAF inserts the header x-amzn-waf-sample. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // The value of the custom header. // // Value is a required field Value *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s CustomHTTPHeader) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CustomHTTPHeader) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CustomHTTPHeader) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CustomHTTPHeader"} if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if s.Value == nil { invalidParams.Add(request.NewErrParamRequired("Value")) } if s.Value != nil && len(*s.Value) < 1 { invalidParams.Add(request.NewErrParamMinLen("Value", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetName sets the Name field's value. func (s *CustomHTTPHeader) SetName(v string) *CustomHTTPHeader { s.Name = &v return s } // SetValue sets the Value field's value. func (s *CustomHTTPHeader) SetValue(v string) *CustomHTTPHeader { s.Value = &v return s } // Custom request handling behavior that inserts custom headers into a web request. // You can add custom request handling for the rule actions allow and count. // // For information about customizing web requests and responses, see Customizing // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). type CustomRequestHandling struct { _ struct{} `type:"structure"` // The HTTP headers to insert into the request. Duplicate header names are not // allowed. // // For information about the limits on count and size for custom request and // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). // // InsertHeaders is a required field InsertHeaders []*CustomHTTPHeader `min:"1" type:"list" required:"true"` } // String returns the string representation func (s CustomRequestHandling) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CustomRequestHandling) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CustomRequestHandling) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CustomRequestHandling"} if s.InsertHeaders == nil { invalidParams.Add(request.NewErrParamRequired("InsertHeaders")) } if s.InsertHeaders != nil && len(s.InsertHeaders) < 1 { invalidParams.Add(request.NewErrParamMinLen("InsertHeaders", 1)) } if s.InsertHeaders != nil { for i, v := range s.InsertHeaders { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InsertHeaders", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetInsertHeaders sets the InsertHeaders field's value. func (s *CustomRequestHandling) SetInsertHeaders(v []*CustomHTTPHeader) *CustomRequestHandling { s.InsertHeaders = v return s } // A custom response to send to the client. You can define a custom response // for rule actions and default web ACL actions that are set to BlockAction. // // For information about customizing web requests and responses, see Customizing // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). type CustomResponse struct { _ struct{} `type:"structure"` // References the response body that you want WAF to return to the web request // client. You can define a custom response for a rule action or a default web // ACL action that is set to block. To do this, you first define the response // body key and value in the CustomResponseBodies setting for the WebACL or // RuleGroup where you want to use it. Then, in the rule action or web ACL default // action BlockAction setting, you reference the response body using this key. CustomResponseBodyKey *string `min:"1" type:"string"` // The HTTP status code to return to the client. // // For a list of status codes that you can use in your custom reqponses, see // Supported status codes for custom response (https://docs.aws.amazon.com/waf/latest/developerguide/customizing-the-response-status-codes.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). // // ResponseCode is a required field ResponseCode *int64 `min:"200" type:"integer" required:"true"` // The HTTP headers to use in the response. Duplicate header names are not allowed. // // For information about the limits on count and size for custom request and // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). ResponseHeaders []*CustomHTTPHeader `min:"1" type:"list"` } // String returns the string representation func (s CustomResponse) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CustomResponse) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CustomResponse) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CustomResponse"} if s.CustomResponseBodyKey != nil && len(*s.CustomResponseBodyKey) < 1 { invalidParams.Add(request.NewErrParamMinLen("CustomResponseBodyKey", 1)) } if s.ResponseCode == nil { invalidParams.Add(request.NewErrParamRequired("ResponseCode")) } if s.ResponseCode != nil && *s.ResponseCode < 200 { invalidParams.Add(request.NewErrParamMinValue("ResponseCode", 200)) } if s.ResponseHeaders != nil && len(s.ResponseHeaders) < 1 { invalidParams.Add(request.NewErrParamMinLen("ResponseHeaders", 1)) } if s.ResponseHeaders != nil { for i, v := range s.ResponseHeaders { if v == nil { continue } if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResponseHeaders", i), err.(request.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetCustomResponseBodyKey sets the CustomResponseBodyKey field's value. func (s *CustomResponse) SetCustomResponseBodyKey(v string) *CustomResponse { s.CustomResponseBodyKey = &v return s } // SetResponseCode sets the ResponseCode field's value. func (s *CustomResponse) SetResponseCode(v int64) *CustomResponse { s.ResponseCode = &v return s } // SetResponseHeaders sets the ResponseHeaders field's value. func (s *CustomResponse) SetResponseHeaders(v []*CustomHTTPHeader) *CustomResponse { s.ResponseHeaders = v return s } // The response body to use in a custom response to a web request. This is referenced // by key from CustomResponse CustomResponseBodyKey. type CustomResponseBody struct { _ struct{} `type:"structure"` // The payload of the custom response. // // You can use JSON escape strings in JSON content. To do this, you must specify // JSON content in the ContentType setting. // // For information about the limits on count and size for custom request and // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html). // // Content is a required field Content *string `min:"1" type:"string" required:"true"` // The type of content in the payload that you are defining in the Content string. // // ContentType is a required field ContentType *string `type:"string" required:"true" enum:"ResponseContentType"` } // String returns the string representation func (s CustomResponseBody) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s CustomResponseBody) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *CustomResponseBody) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CustomResponseBody"} if s.Content == nil { invalidParams.Add(request.NewErrParamRequired("Content")) } if s.Content != nil && len(*s.Content) < 1 { invalidParams.Add(request.NewErrParamMinLen("Content", 1)) } if s.ContentType == nil { invalidParams.Add(request.NewErrParamRequired("ContentType")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetContent sets the Content field's value. func (s *CustomResponseBody) SetContent(v string) *CustomResponseBody { s.Content = &v return s } // SetContentType sets the ContentType field's value. func (s *CustomResponseBody) SetContentType(v string) *CustomResponseBody { s.ContentType = &v return s } // In a WebACL, this is the action that you want WAF to perform when a web request // doesn't match any of the rules in the WebACL. The default action must be // a terminating action, so you can't use count. type DefaultAction struct { _ struct{} `type:"structure"` // Specifies that WAF should allow requests by default. Allow *AllowAction `type:"structure"` // Specifies that WAF should block requests by default. Block *BlockAction `type:"structure"` } // String returns the string representation func (s DefaultAction) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DefaultAction) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DefaultAction) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DefaultAction"} if s.Allow != nil { if err := s.Allow.Validate(); err != nil { invalidParams.AddNested("Allow", err.(request.ErrInvalidParams)) } } if s.Block != nil { if err := s.Block.Validate(); err != nil { invalidParams.AddNested("Block", err.(request.ErrInvalidParams)) } } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetAllow sets the Allow field's value. func (s *DefaultAction) SetAllow(v *AllowAction) *DefaultAction { s.Allow = v return s } // SetBlock sets the Block field's value. func (s *DefaultAction) SetBlock(v *BlockAction) *DefaultAction { s.Block = v return s } type DeleteFirewallManagerRuleGroupsInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the web ACL. // // WebACLArn is a required field WebACLArn *string `min:"20" type:"string" required:"true"` // A token used for optimistic locking. WAF returns a token to your get and // list requests, to mark the state of the entity at the time of the request. // To make changes to the entity associated with the token, you provide the // token to operations like update and delete. WAF uses the token to ensure // that no changes have been made to the entity since you last retrieved it. // If a change has been made, the update fails with a WAFOptimisticLockException. // If this happens, perform another get, and use the new token returned by that // operation. // // WebACLLockToken is a required field WebACLLockToken *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteFirewallManagerRuleGroupsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteFirewallManagerRuleGroupsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteFirewallManagerRuleGroupsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteFirewallManagerRuleGroupsInput"} if s.WebACLArn == nil { invalidParams.Add(request.NewErrParamRequired("WebACLArn")) } if s.WebACLArn != nil && len(*s.WebACLArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("WebACLArn", 20)) } if s.WebACLLockToken == nil { invalidParams.Add(request.NewErrParamRequired("WebACLLockToken")) } if s.WebACLLockToken != nil && len(*s.WebACLLockToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("WebACLLockToken", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetWebACLArn sets the WebACLArn field's value. func (s *DeleteFirewallManagerRuleGroupsInput) SetWebACLArn(v string) *DeleteFirewallManagerRuleGroupsInput { s.WebACLArn = &v return s } // SetWebACLLockToken sets the WebACLLockToken field's value. func (s *DeleteFirewallManagerRuleGroupsInput) SetWebACLLockToken(v string) *DeleteFirewallManagerRuleGroupsInput { s.WebACLLockToken = &v return s } type DeleteFirewallManagerRuleGroupsOutput struct { _ struct{} `type:"structure"` // A token used for optimistic locking. WAF returns a token to your get and // list requests, to mark the state of the entity at the time of the request. // To make changes to the entity associated with the token, you provide the // token to operations like update and delete. WAF uses the token to ensure // that no changes have been made to the entity since you last retrieved it. // If a change has been made, the update fails with a WAFOptimisticLockException. // If this happens, perform another get, and use the new token returned by that // operation. NextWebACLLockToken *string `min:"1" type:"string"` } // String returns the string representation func (s DeleteFirewallManagerRuleGroupsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteFirewallManagerRuleGroupsOutput) GoString() string { return s.String() } // SetNextWebACLLockToken sets the NextWebACLLockToken field's value. func (s *DeleteFirewallManagerRuleGroupsOutput) SetNextWebACLLockToken(v string) *DeleteFirewallManagerRuleGroupsOutput { s.NextWebACLLockToken = &v return s } type DeleteIPSetInput struct { _ struct{} `type:"structure"` // A unique identifier for the set. This ID is returned in the responses to // create and list commands. You provide it to operations like update and delete. // // Id is a required field Id *string `min:"1" type:"string" required:"true"` // A token used for optimistic locking. WAF returns a token to your get and // list requests, to mark the state of the entity at the time of the request. // To make changes to the entity associated with the token, you provide the // token to operations like update and delete. WAF uses the token to ensure // that no changes have been made to the entity since you last retrieved it. // If a change has been made, the update fails with a WAFOptimisticLockException. // If this happens, perform another get, and use the new token returned by that // operation. // // LockToken is a required field LockToken *string `min:"1" type:"string" required:"true"` // The name of the IP set. You cannot change the name of an IPSet after you // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // Specifies whether this is for an Amazon CloudFront distribution or for a // regional application. A regional application can be an Application Load Balancer // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. // // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. // // Scope is a required field Scope *string `type:"string" required:"true" enum:"Scope"` } // String returns the string representation func (s DeleteIPSetInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteIPSetInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteIPSetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteIPSetInput"} if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } if s.Id != nil && len(*s.Id) < 1 { invalidParams.Add(request.NewErrParamMinLen("Id", 1)) } if s.LockToken == nil { invalidParams.Add(request.NewErrParamRequired("LockToken")) } if s.LockToken != nil && len(*s.LockToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("LockToken", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if s.Scope == nil { invalidParams.Add(request.NewErrParamRequired("Scope")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetId sets the Id field's value. func (s *DeleteIPSetInput) SetId(v string) *DeleteIPSetInput { s.Id = &v return s } // SetLockToken sets the LockToken field's value. func (s *DeleteIPSetInput) SetLockToken(v string) *DeleteIPSetInput { s.LockToken = &v return s } // SetName sets the Name field's value. func (s *DeleteIPSetInput) SetName(v string) *DeleteIPSetInput { s.Name = &v return s } // SetScope sets the Scope field's value. func (s *DeleteIPSetInput) SetScope(v string) *DeleteIPSetInput { s.Scope = &v return s } type DeleteIPSetOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteIPSetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteIPSetOutput) GoString() string { return s.String() } type DeleteLoggingConfigurationInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the web ACL from which you want to delete // the LoggingConfiguration. // // ResourceArn is a required field ResourceArn *string `min:"20" type:"string" required:"true"` } // String returns the string representation func (s DeleteLoggingConfigurationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteLoggingConfigurationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteLoggingConfigurationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteLoggingConfigurationInput"} if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } if s.ResourceArn != nil && len(*s.ResourceArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceArn sets the ResourceArn field's value. func (s *DeleteLoggingConfigurationInput) SetResourceArn(v string) *DeleteLoggingConfigurationInput { s.ResourceArn = &v return s } type DeleteLoggingConfigurationOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteLoggingConfigurationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteLoggingConfigurationOutput) GoString() string { return s.String() } type DeletePermissionPolicyInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the rule group from which you want to delete // the policy. // // You must be the owner of the rule group to perform this operation. // // ResourceArn is a required field ResourceArn *string `min:"20" type:"string" required:"true"` } // String returns the string representation func (s DeletePermissionPolicyInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeletePermissionPolicyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeletePermissionPolicyInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeletePermissionPolicyInput"} if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } if s.ResourceArn != nil && len(*s.ResourceArn) < 20 { invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetResourceArn sets the ResourceArn field's value. func (s *DeletePermissionPolicyInput) SetResourceArn(v string) *DeletePermissionPolicyInput { s.ResourceArn = &v return s } type DeletePermissionPolicyOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeletePermissionPolicyOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeletePermissionPolicyOutput) GoString() string { return s.String() } type DeleteRegexPatternSetInput struct { _ struct{} `type:"structure"` // A unique identifier for the set. This ID is returned in the responses to // create and list commands. You provide it to operations like update and delete. // // Id is a required field Id *string `min:"1" type:"string" required:"true"` // A token used for optimistic locking. WAF returns a token to your get and // list requests, to mark the state of the entity at the time of the request. // To make changes to the entity associated with the token, you provide the // token to operations like update and delete. WAF uses the token to ensure // that no changes have been made to the entity since you last retrieved it. // If a change has been made, the update fails with a WAFOptimisticLockException. // If this happens, perform another get, and use the new token returned by that // operation. // // LockToken is a required field LockToken *string `min:"1" type:"string" required:"true"` // The name of the set. You cannot change the name after you create the set. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // Specifies whether this is for an Amazon CloudFront distribution or for a // regional application. A regional application can be an Application Load Balancer // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. // // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. // // Scope is a required field Scope *string `type:"string" required:"true" enum:"Scope"` } // String returns the string representation func (s DeleteRegexPatternSetInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteRegexPatternSetInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteRegexPatternSetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteRegexPatternSetInput"} if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } if s.Id != nil && len(*s.Id) < 1 { invalidParams.Add(request.NewErrParamMinLen("Id", 1)) } if s.LockToken == nil { invalidParams.Add(request.NewErrParamRequired("LockToken")) } if s.LockToken != nil && len(*s.LockToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("LockToken", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if s.Scope == nil { invalidParams.Add(request.NewErrParamRequired("Scope")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetId sets the Id field's value. func (s *DeleteRegexPatternSetInput) SetId(v string) *DeleteRegexPatternSetInput { s.Id = &v return s } // SetLockToken sets the LockToken field's value. func (s *DeleteRegexPatternSetInput) SetLockToken(v string) *DeleteRegexPatternSetInput { s.LockToken = &v return s } // SetName sets the Name field's value. func (s *DeleteRegexPatternSetInput) SetName(v string) *DeleteRegexPatternSetInput { s.Name = &v return s } // SetScope sets the Scope field's value. func (s *DeleteRegexPatternSetInput) SetScope(v string) *DeleteRegexPatternSetInput { s.Scope = &v return s } type DeleteRegexPatternSetOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteRegexPatternSetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteRegexPatternSetOutput) GoString() string { return s.String() } type DeleteRuleGroupInput struct { _ struct{} `type:"structure"` // A unique identifier for the rule group. This ID is returned in the responses // to create and list commands. You provide it to operations like update and // delete. // // Id is a required field Id *string `min:"1" type:"string" required:"true"` // A token used for optimistic locking. WAF returns a token to your get and // list requests, to mark the state of the entity at the time of the request. // To make changes to the entity associated with the token, you provide the // token to operations like update and delete. WAF uses the token to ensure // that no changes have been made to the entity since you last retrieved it. // If a change has been made, the update fails with a WAFOptimisticLockException. // If this happens, perform another get, and use the new token returned by that // operation. // // LockToken is a required field LockToken *string `min:"1" type:"string" required:"true"` // The name of the rule group. You cannot change the name of a rule group after // you create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // Specifies whether this is for an Amazon CloudFront distribution or for a // regional application. A regional application can be an Application Load Balancer // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. // // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. // // Scope is a required field Scope *string `type:"string" required:"true" enum:"Scope"` } // String returns the string representation func (s DeleteRuleGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteRuleGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteRuleGroupInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteRuleGroupInput"} if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } if s.Id != nil && len(*s.Id) < 1 { invalidParams.Add(request.NewErrParamMinLen("Id", 1)) } if s.LockToken == nil { invalidParams.Add(request.NewErrParamRequired("LockToken")) } if s.LockToken != nil && len(*s.LockToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("LockToken", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if s.Scope == nil { invalidParams.Add(request.NewErrParamRequired("Scope")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetId sets the Id field's value. func (s *DeleteRuleGroupInput) SetId(v string) *DeleteRuleGroupInput { s.Id = &v return s } // SetLockToken sets the LockToken field's value. func (s *DeleteRuleGroupInput) SetLockToken(v string) *DeleteRuleGroupInput { s.LockToken = &v return s } // SetName sets the Name field's value. func (s *DeleteRuleGroupInput) SetName(v string) *DeleteRuleGroupInput { s.Name = &v return s } // SetScope sets the Scope field's value. func (s *DeleteRuleGroupInput) SetScope(v string) *DeleteRuleGroupInput { s.Scope = &v return s } type DeleteRuleGroupOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteRuleGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteRuleGroupOutput) GoString() string { return s.String() } type DeleteWebACLInput struct { _ struct{} `type:"structure"` // The unique identifier for the web ACL. This ID is returned in the responses // to create and list commands. You provide it to operations like update and // delete. // // Id is a required field Id *string `min:"1" type:"string" required:"true"` // A token used for optimistic locking. WAF returns a token to your get and // list requests, to mark the state of the entity at the time of the request. // To make changes to the entity associated with the token, you provide the // token to operations like update and delete. WAF uses the token to ensure // that no changes have been made to the entity since you last retrieved it. // If a change has been made, the update fails with a WAFOptimisticLockException. // If this happens, perform another get, and use the new token returned by that // operation. // // LockToken is a required field LockToken *string `min:"1" type:"string" required:"true"` // The name of the web ACL. You cannot change the name of a web ACL after you // create it. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // Specifies whether this is for an Amazon CloudFront distribution or for a // regional application. A regional application can be an Application Load Balancer // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. // // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. // // Scope is a required field Scope *string `type:"string" required:"true" enum:"Scope"` } // String returns the string representation func (s DeleteWebACLInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteWebACLInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteWebACLInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteWebACLInput"} if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } if s.Id != nil && len(*s.Id) < 1 { invalidParams.Add(request.NewErrParamMinLen("Id", 1)) } if s.LockToken == nil { invalidParams.Add(request.NewErrParamRequired("LockToken")) } if s.LockToken != nil && len(*s.LockToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("LockToken", 1)) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if s.Scope == nil { invalidParams.Add(request.NewErrParamRequired("Scope")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetId sets the Id field's value. func (s *DeleteWebACLInput) SetId(v string) *DeleteWebACLInput { s.Id = &v return s } // SetLockToken sets the LockToken field's value. func (s *DeleteWebACLInput) SetLockToken(v string) *DeleteWebACLInput { s.LockToken = &v return s } // SetName sets the Name field's value. func (s *DeleteWebACLInput) SetName(v string) *DeleteWebACLInput { s.Name = &v return s } // SetScope sets the Scope field's value. func (s *DeleteWebACLInput) SetScope(v string) *DeleteWebACLInput { s.Scope = &v return s } type DeleteWebACLOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteWebACLOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DeleteWebACLOutput) GoString() string { return s.String() } type DescribeManagedRuleGroupInput struct { _ struct{} `type:"structure"` // The name of the managed rule group. You use this, along with the vendor name, // to identify the rule group. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` // Specifies whether this is for an Amazon CloudFront distribution or for a // regional application. A regional application can be an Application Load Balancer // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API. // // To work with CloudFront, you must also specify the Region US East (N. Virginia) // as follows: // // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT // --region=us-east-1. // // * API and SDKs - For all calls, use the Region endpoint us-east-1. // // Scope is a required field Scope *string `type:"string" required:"true" enum:"Scope"` // The name of the managed rule group vendor. You use this, along with the rule // group name, to identify the rule group. // // VendorName is a required field VendorName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DescribeManagedRuleGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation func (s DescribeManagedRuleGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeManagedRuleGroupInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DescribeManagedRuleGroupInput"} if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if s.Scope == nil { invalidParams.Add(request.NewErrParamRequired("Scope")) } if s.VendorName == nil { invalidParams.Add(request.NewErrParamRequired("VendorName")) } if s.VendorName != nil && len(*s.VendorName) < 1 { invalidParams.Add(request.NewErrParamMinLen("VendorName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } // SetName sets the Name field's value. func (s *DescribeManagedRuleGroupInput) SetName(v string) *DescribeManagedRuleGroupInput { s.Name = &v return s } // SetScope sets the Scope field's value. func (s *DescribeManagedRuleGroupInput) SetScope(v string) *DescribeManagedRuleGroupInput { s.Scope = &v return s } // SetVendorName sets the VendorName field's value. func (s *DescribeManagedRuleGroupInput) SetVendorName(v string) *DescribeManagedRuleGroupInput { s.VendorName = &v return s } type DescribeManagedRuleGroupOutput struct { _ struct{} `type:"structure"` // The labels that one or more rules in this rule group add to matching web // requests. These labels are defined in the RuleLabels for a Rule. AvailableLabels []*LabelSummary `type:"list"` // The web ACL capacity units (WCUs) required for this rule group. WAF uses // web ACL capacity units (WCU) to calculate and control the operating resources // that are used to run your rules, rule groups, and web ACLs. WAF calculates // capacity differently for each rule type, to reflect each rule's relative // cost. Rule group capacity is fixed at creation, so users can plan their web // ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500. Capacity *int64 `min:"1" type:"long"` // The labels that one or more rules in this rule group match against in label // match statements. These labels are defined in a LabelMatchStatement specification, // in the Statement definition of a rule. ConsumedLabels []*LabelSummary `type:"list"` // The label namespace prefix for this rule group. All labels added by rules // in this rule group have this prefix. // // * The syntax for the label namespace prefix for a managed rule group is // the following: awswaf:managed::: // // * When a rule with a label matches a web request, WAF adds the fully qualified // label to the request. A fully qualified label is made up of the label // namespace from the rule group or web ACL where the rule is defined and // the label from the rule, separated by a colon: