aws_sdk_wafv2/client/
create_ip_set.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateIPSet`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`name(impl Into<String>)`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::set_name):<br>required: **true**<br><p>The name of the IP set. You cannot change the name of an <code>IPSet</code> after you create it.</p><br>
    ///   - [`scope(Scope)`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::scope) / [`set_scope(Option<Scope>)`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::set_scope):<br>required: **true**<br><p>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, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.</p> <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:</p> <ul>  <li>   <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>.</p></li>  <li>   <p>API and SDKs - For all calls, use the Region endpoint us-east-1.</p></li> </ul><br>
    ///   - [`description(impl Into<String>)`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::set_description):<br>required: **false**<br><p>A description of the IP set that helps with identification.</p><br>
    ///   - [`ip_address_version(IpAddressVersion)`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::ip_address_version) / [`set_ip_address_version(Option<IpAddressVersion>)`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::set_ip_address_version):<br>required: **true**<br><p>The version of the IP addresses, either <code>IPV4</code> or <code>IPV6</code>.</p><br>
    ///   - [`addresses(impl Into<String>)`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::addresses) / [`set_addresses(Option<Vec::<String>>)`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::set_addresses):<br>required: **true**<br><p>Contains an array of strings that specifies zero or more IP addresses or blocks of IP addresses that you want WAF to inspect for in incoming requests. All addresses must be specified using Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for <code>/0</code>.</p> <p>Example address strings:</p> <ul>  <li>   <p>For requests that originated from the IP address 192.0.2.44, specify <code>192.0.2.44/32</code>.</p></li>  <li>   <p>For requests that originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify <code>192.0.2.0/24</code>.</p></li>  <li>   <p>For requests that originated from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify <code>1111:0000:0000:0000:0000:0000:0000:0111/128</code>.</p></li>  <li>   <p>For requests that originated from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify <code>1111:0000:0000:0000:0000:0000:0000:0000/64</code>.</p></li> </ul> <p>For more information about CIDR notation, see the Wikipedia entry <a href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">Classless Inter-Domain Routing</a>.</p> <p>Example JSON <code>Addresses</code> specifications:</p> <ul>  <li>   <p>Empty array: <code>"Addresses": \[\]</code></p></li>  <li>   <p>Array with one address: <code>"Addresses": \["192.0.2.44/32"\]</code></p></li>  <li>   <p>Array with three addresses: <code>"Addresses": \["192.0.2.44/32", "192.0.2.0/24", "192.0.0.0/16"\]</code></p></li>  <li>   <p>INVALID specification: <code>"Addresses": \[""\]</code> INVALID</p></li> </ul><br>
    ///   - [`tags(Tag)`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::set_tags):<br>required: **false**<br><p>An array of key:value pairs to associate with the resource.</p><br>
    /// - On success, responds with [`CreateIpSetOutput`](crate::operation::create_ip_set::CreateIpSetOutput) with field(s):
    ///   - [`summary(Option<IpSetSummary>)`](crate::operation::create_ip_set::CreateIpSetOutput::summary): <p>High-level information about an <code>IPSet</code>, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage an <code>IPSet</code>, and the ARN, that you provide to the <code>IPSetReferenceStatement</code> to use the address set in a <code>Rule</code>.</p>
    /// - On failure, responds with [`SdkError<CreateIPSetError>`](crate::operation::create_ip_set::CreateIPSetError)
    pub fn create_ip_set(&self) -> crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder {
        crate::operation::create_ip_set::builders::CreateIPSetFluentBuilder::new(self.handle.clone())
    }
}