WafV2 class
This is the latest version of the WAF API, released in November, 2019. The names of the entities that you use to access this API, like endpoints and namespaces, all have the versioning information added, like "V2" or "v2", to distinguish from the prior version. We recommend migrating your resources to this version, because it has a number of significant improvements.
Constructors
- WafV2({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
associateWebACL(
{required String resourceArn, required String webACLArn}) → Future< void> - Associates a web ACL with a resource, to protect the resource.
-
checkCapacity(
{required List< Rule> rules, required Scope scope}) → Future<CheckCapacityResponse> - 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.
-
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
createAPIKey(
{required Scope scope, required List< String> tokenDomains}) → Future<CreateAPIKeyResponse> - Creates an API key that contains a set of token domains.
-
createIPSet(
{required List< String> addresses, required IPAddressVersion iPAddressVersion, required String name, required Scope scope, String? description, List<Tag> ? tags}) → Future<CreateIPSetResponse> - 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.
-
createRegexPatternSet(
{required String name, required List< Regex> regularExpressionList, required Scope scope, String? description, List<Tag> ? tags}) → Future<CreateRegexPatternSetResponse> - Creates a RegexPatternSet, which you reference in a RegexPatternSetReferenceStatement, to have WAF inspect a web request component for the specified patterns.
-
createRuleGroup(
{required int capacity, required String name, required Scope scope, required VisibilityConfig visibilityConfig, Map< String, CustomResponseBody> ? customResponseBodies, String? description, List<Rule> ? rules, List<Tag> ? tags}) → Future<CreateRuleGroupResponse> - Creates a RuleGroup per the specifications provided.
-
createWebACL(
{required DefaultAction defaultAction, required String name, required Scope scope, required VisibilityConfig visibilityConfig, ApplicationConfig? applicationConfig, AssociationConfig? associationConfig, CaptchaConfig? captchaConfig, ChallengeConfig? challengeConfig, Map< String, CustomResponseBody> ? customResponseBodies, DataProtectionConfig? dataProtectionConfig, String? description, OnSourceDDoSProtectionConfig? onSourceDDoSProtectionConfig, List<Rule> ? rules, List<Tag> ? tags, List<String> ? tokenDomains}) → Future<CreateWebACLResponse> - Creates a WebACL per the specifications provided.
-
deleteAPIKey(
{required String aPIKey, required Scope scope}) → Future< void> - Deletes the specified API key.
-
deleteFirewallManagerRuleGroups(
{required String webACLArn, required String webACLLockToken}) → Future< DeleteFirewallManagerRuleGroupsResponse> - Deletes all rule groups that are managed by Firewall Manager from the specified WebACL.
-
deleteIPSet(
{required String id, required String lockToken, required String name, required Scope scope}) → Future< void> - Deletes the specified IPSet.
-
deleteLoggingConfiguration(
{required String resourceArn, LogScope? logScope, LogType? logType}) → Future< void> - Deletes the LoggingConfiguration from the specified web ACL.
-
deletePermissionPolicy(
{required String resourceArn}) → Future< void> - Permanently deletes an IAM policy from the specified rule group.
-
deleteRegexPatternSet(
{required String id, required String lockToken, required String name, required Scope scope}) → Future< void> - Deletes the specified RegexPatternSet.
-
deleteRuleGroup(
{required String id, required String lockToken, required String name, required Scope scope}) → Future< void> - Deletes the specified RuleGroup.
-
deleteWebACL(
{required String id, required String lockToken, required String name, required Scope scope}) → Future< void> - Deletes the specified WebACL.
-
describeAllManagedProducts(
{required Scope scope}) → Future< DescribeAllManagedProductsResponse> - Provides high-level information for the Amazon Web Services Managed Rules rule groups and Amazon Web Services Marketplace managed rule groups.
-
describeManagedProductsByVendor(
{required Scope scope, required String vendorName}) → Future< DescribeManagedProductsByVendorResponse> - Provides high-level information for the managed rule groups owned by a specific vendor.
-
describeManagedRuleGroup(
{required String name, required Scope scope, required String vendorName, String? versionName}) → Future< DescribeManagedRuleGroupResponse> - Provides high-level information for a managed rule group, including descriptions of the rules.
-
disassociateWebACL(
{required String resourceArn}) → Future< void> - Disassociates the specified resource from its web ACL association, if it has one.
-
generateMobileSdkReleaseUrl(
{required Platform platform, required String releaseVersion}) → Future< GenerateMobileSdkReleaseUrlResponse> - Generates a presigned download URL for the specified release of the mobile SDK.
-
getDecryptedAPIKey(
{required String aPIKey, required Scope scope}) → Future< GetDecryptedAPIKeyResponse> - Returns your API key in decrypted form. Use this to check the token domains that you have defined for the key.
-
getIPSet(
{required String id, required String name, required Scope scope}) → Future< GetIPSetResponse> - Retrieves the specified IPSet.
-
getLoggingConfiguration(
{required String resourceArn, LogScope? logScope, LogType? logType}) → Future< GetLoggingConfigurationResponse> - Returns the LoggingConfiguration for the specified web ACL.
-
getManagedRuleSet(
{required String id, required String name, required Scope scope}) → Future< GetManagedRuleSetResponse> - Retrieves the specified managed rule set.
-
getMobileSdkRelease(
{required Platform platform, required String releaseVersion}) → Future< GetMobileSdkReleaseResponse> - Retrieves information for the specified mobile SDK release, including release notes and tags.
-
getPermissionPolicy(
{required String resourceArn}) → Future< GetPermissionPolicyResponse> - Returns the IAM policy that is attached to the specified rule group.
-
getRateBasedStatementManagedKeys(
{required String ruleName, required Scope scope, required String webACLId, required String webACLName, String? ruleGroupRuleName}) → Future< GetRateBasedStatementManagedKeysResponse> - Retrieves the IP addresses that are currently blocked by a rate-based rule instance. This is only available for rate-based rules that aggregate solely on the IP address or on the forwarded IP address.
-
getRegexPatternSet(
{required String id, required String name, required Scope scope}) → Future< GetRegexPatternSetResponse> - Retrieves the specified RegexPatternSet.
-
getRuleGroup(
{String? arn, String? id, String? name, Scope? scope}) → Future< GetRuleGroupResponse> - Retrieves the specified RuleGroup.
-
getSampledRequests(
{required int maxItems, required String ruleMetricName, required Scope scope, required TimeWindow timeWindow, required String webAclArn}) → Future< GetSampledRequestsResponse> - 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.
-
getTopPathStatisticsByTraffic(
{required int limit, required int numberOfTopTrafficBotsPerPath, required Scope scope, required TimeWindow timeWindow, required String webAclArn, String? botCategory, String? botName, String? botOrganization, String? nextMarker, String? uriPathPrefix}) → Future< GetTopPathStatisticsByTrafficResponse> - Retrieves aggregated statistics about the top URI paths accessed by bot traffic for a specified web ACL and time window. You can use this operation to analyze which paths on your web application receive the most bot traffic and identify the specific bots accessing those paths. The operation supports filtering by bot category, organization, or name, and allows you to drill down into specific path prefixes to view detailed URI-level statistics.
-
getWebACL(
{String? arn, String? id, String? name, Scope? scope}) → Future< GetWebACLResponse> - Retrieves the specified WebACL.
-
getWebACLForResource(
{required String resourceArn}) → Future< GetWebACLForResourceResponse> - Retrieves the WebACL for the specified resource.
-
listAPIKeys(
{required Scope scope, int? limit, String? nextMarker}) → Future< ListAPIKeysResponse> - Retrieves a list of the API keys that you've defined for the specified scope.
-
listAvailableManagedRuleGroups(
{required Scope scope, int? limit, String? nextMarker}) → Future< ListAvailableManagedRuleGroupsResponse> - 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 all of the Amazon Web Services Marketplace managed rule groups that you're subscribed to.
-
listAvailableManagedRuleGroupVersions(
{required String name, required Scope scope, required String vendorName, int? limit, String? nextMarker}) → Future< ListAvailableManagedRuleGroupVersionsResponse> - Returns a list of the available versions for the specified managed rule group.
-
listIPSets(
{required Scope scope, int? limit, String? nextMarker}) → Future< ListIPSetsResponse> - Retrieves an array of IPSetSummary objects for the IP sets that you manage.
-
listLoggingConfigurations(
{required Scope scope, int? limit, LogScope? logScope, String? nextMarker}) → Future< ListLoggingConfigurationsResponse> - Retrieves an array of your LoggingConfiguration objects.
-
listManagedRuleSets(
{required Scope scope, int? limit, String? nextMarker}) → Future< ListManagedRuleSetsResponse> - Retrieves the managed rule sets that you own.
-
listMobileSdkReleases(
{required Platform platform, int? limit, String? nextMarker}) → Future< ListMobileSdkReleasesResponse> - Retrieves a list of the available releases for the mobile SDK and the specified device platform.
-
listRegexPatternSets(
{required Scope scope, int? limit, String? nextMarker}) → Future< ListRegexPatternSetsResponse> - Retrieves an array of RegexPatternSetSummary objects for the regex pattern sets that you manage.
-
listResourcesForWebACL(
{required String webACLArn, ResourceType? resourceType}) → Future< ListResourcesForWebACLResponse> - Retrieves an array of the Amazon Resource Names (ARNs) for the resources that are associated with the specified web ACL.
-
listRuleGroups(
{required Scope scope, int? limit, String? nextMarker}) → Future< ListRuleGroupsResponse> - Retrieves an array of RuleGroupSummary objects for the rule groups that you manage.
-
listTagsForResource(
{required String resourceARN, int? limit, String? nextMarker}) → Future< ListTagsForResourceResponse> - 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.
-
listWebACLs(
{required Scope scope, int? limit, String? nextMarker}) → Future< ListWebACLsResponse> - Retrieves an array of WebACLSummary objects for the web ACLs that you manage.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
putLoggingConfiguration(
{required LoggingConfiguration loggingConfiguration}) → Future< PutLoggingConfigurationResponse> - Enables the specified LoggingConfiguration, to start logging from a web ACL, according to the configuration provided.
-
putManagedRuleSetVersions(
{required String id, required String lockToken, required String name, required Scope scope, String? recommendedVersion, Map< String, VersionToPublish> ? versionsToPublish}) → Future<PutManagedRuleSetVersionsResponse> - Defines the versions of your managed rule set that you are offering to the customers. Customers see your offerings as managed rule groups with versioning.
-
putPermissionPolicy(
{required String policy, required String resourceArn}) → Future< void> - Use this to share a rule group with other accounts.
-
tagResource(
{required String resourceARN, required List< Tag> tags}) → Future<void> - 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.
-
toString(
) → String -
A string representation of this object.
inherited
-
untagResource(
{required String resourceARN, required List< String> tagKeys}) → Future<void> - 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.
-
updateIPSet(
{required List< String> addresses, required String id, required String lockToken, required String name, required Scope scope, String? description}) → Future<UpdateIPSetResponse> - Updates the specified IPSet.
-
updateManagedRuleSetVersionExpiryDate(
{required DateTime expiryTimestamp, required String id, required String lockToken, required String name, required Scope scope, required String versionToExpire}) → Future< UpdateManagedRuleSetVersionExpiryDateResponse> - Updates the expiration information for your managed rule set. Use this to initiate the expiration of a managed rule group version. After you initiate expiration for a version, WAF excludes it from the response to ListAvailableManagedRuleGroupVersions for the managed rule group.
-
updateRegexPatternSet(
{required String id, required String lockToken, required String name, required List< Regex> regularExpressionList, required Scope scope, String? description}) → Future<UpdateRegexPatternSetResponse> - Updates the specified RegexPatternSet.
-
updateRuleGroup(
{required String id, required String lockToken, required String name, required Scope scope, required VisibilityConfig visibilityConfig, Map< String, CustomResponseBody> ? customResponseBodies, String? description, List<Rule> ? rules}) → Future<UpdateRuleGroupResponse> - Updates the specified RuleGroup.
-
updateWebACL(
{required DefaultAction defaultAction, required String id, required String lockToken, required String name, required Scope scope, required VisibilityConfig visibilityConfig, ApplicationConfig? applicationConfig, AssociationConfig? associationConfig, CaptchaConfig? captchaConfig, ChallengeConfig? challengeConfig, Map< String, CustomResponseBody> ? customResponseBodies, DataProtectionConfig? dataProtectionConfig, String? description, OnSourceDDoSProtectionConfig? onSourceDDoSProtectionConfig, List<Rule> ? rules, List<String> ? tokenDomains}) → Future<UpdateWebACLResponse> - Updates the specified WebACL. While updating a web ACL, WAF provides continuous coverage to the resources that you have associated with the web ACL.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited