99 releases (55 stable)

1.55.0 Dec 4, 2024
1.54.0 Nov 6, 2024
1.53.0 Oct 31, 2024
1.40.0 Jul 22, 2024
0.0.0 May 7, 2021

#2544 in Network programming

Download history 1/week @ 2024-08-22 265/week @ 2024-08-29 171/week @ 2024-09-05 190/week @ 2024-09-12 151/week @ 2024-09-19 211/week @ 2024-09-26 174/week @ 2024-10-03 226/week @ 2024-10-10 160/week @ 2024-10-17 137/week @ 2024-10-24 227/week @ 2024-10-31 149/week @ 2024-11-07 10/week @ 2024-11-14 13/week @ 2024-11-21 502/week @ 2024-11-28 1568/week @ 2024-12-05

2,094 downloads per month

Apache-2.0

6MB
77K SLoC

aws-sdk-wafv2

WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that are forwarded to an Amazon CloudFront distribution, Amazon API Gateway REST API, Application Load Balancer, AppSync GraphQL API, Amazon Cognito user pool, App Runner service, or Amazon Web Services Verified Access instance. WAF also lets you control access to your content, to protect the Amazon Web Services resource that WAF is monitoring. Based on conditions that you specify, such as the IP addresses that requests originate from or the values of query strings, the protected resource responds to requests with either the requested content, an HTTP 403 status code (Forbidden), or with a custom response.

This API guide is for developers who need detailed information about WAF API actions, data types, and errors. For detailed information about WAF features and guidance for configuring and using WAF, see the WAF Developer Guide.

You can make calls using the endpoints listed in WAF endpoints and quotas.

  • For regional applications, you can use any of the endpoints in the list. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.
  • For Amazon CloudFront applications, you must use the API endpoint listed for US East (N. Virginia): us-east-1.

Alternatively, you can use one of the Amazon Web Services SDKs to access an API that's tailored to the programming language or platform that you're using. For more information, see Amazon Web Services SDKs.

Getting Started

Examples are available for many services and operations, check out the examples folder in GitHub.

The SDK provides one crate per AWS service. You must add Tokio as a dependency within your Rust project to execute asynchronous code. To add aws-sdk-wafv2 to your project, add the following to your Cargo.toml file:

[dependencies]
aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
aws-sdk-wafv2 = "1.55.0"
tokio = { version = "1", features = ["full"] }

Then in code, a client can be created with the following:

use aws_sdk_wafv2 as wafv2;

#[::tokio::main]
async fn main() -> Result<(), wafv2::Error> {
    let config = aws_config::load_from_env().await;
    let client = aws_sdk_wafv2::Client::new(&config);

    // ... make some calls with the client

    Ok(())
}

See the client documentation for information on what calls can be made, and the inputs and outputs for each of those calls.

Using the SDK

Until the SDK is released, we will be adding information about using the SDK to the Developer Guide. Feel free to suggest additional sections for the guide by opening an issue and describing what you are trying to do.

Getting Help

License

This project is licensed under the Apache-2.0 License.

Dependencies

~8–20MB
~286K SLoC