Crates.io | aws-sdk-wafv2 |
lib.rs | aws-sdk-wafv2 |
version | 1.55.0 |
source | src |
created_at | 2021-05-07 20:22:44.62182 |
updated_at | 2024-12-04 07:52:09.293033 |
description | AWS SDK for AWS WAFV2 |
homepage | |
repository | https://github.com/awslabs/aws-sdk-rust |
max_upload_size | |
id | 394438 |
size | 5,924,098 |
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.
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.
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.
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.
This project is licensed under the Apache-2.0 License.