CmdID / aws / aws waf-regional
aws waf-regional update-ip-set
This is AWS WAF Classic documentation. AWS CLI reference
1 example 3 options Its page in the AWS CLI reference
Examples
To update an IP set
The following update-ip-set example updates an IPSet with an IPv4 address and deletes an IPv6 address. Get the value for change-token by running the get-change-token command. Because the value for updates includes embedded double-quotes, you must surround the value with single quotes.
aws waf-regional update-ip-set --ip-set-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 --change-token 12cs345-67cd-890b-1cd2-c3a4567d89f1 --updates 'Action="INSERT",IPSetDescriptor={Type="IPV4",Value="12.34.56.78/16"}' 'Action="DELETE",IPSetDescriptor={Type="IPV6",Value="1111:0000:0000:0000:0000:0000:0000:0111/128"}'Identify--ip-set-idThe IPSetId of the IPSet that you want to update.--change-tokenThe value returned by the most recent call to GetChangeToken.--updatesAn array of IPSetUpdate objects that you want to insert into or delete from an IPSet.Its output
{
"ChangeToken": "12cs345-67cd-890b-1cd2-c3a4567d89f1"
}Alternatively, you can use a JSON file to specify the input, as shown in the following example.
aws waf-regional update-ip-set --ip-set-id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 --change-token 12cs345-67cd-890b-1cd2-c3a4567d89f1 --updates file://change.jsonIdentify--ip-set-idThe IPSetId of the IPSet that you want to update.--change-tokenThe value returned by the most recent call to GetChangeToken.--updatesAn array of IPSetUpdate objects that you want to insert into or delete from an IPSet.Contents of change.json:
[
{
"Action": "INSERT",
"IPSetDescriptor":
{
"Type": "IPV4",
"Value": "12.34.56.78/16"
}
},
{
"Action": "DELETE",
"IPSetDescriptor":
{
"Type": "IPV6",
"Value": "1111:0000:0000:0000:0000:0000:0000:0111/128"
}
}
]
Its output
{
"ChangeToken": "12cs345-67cd-890b-1cd2-c3a4567d89f1"
}For more information, see Working with IP match conditions in the AWS WAF Developer Guide.
Options
--change-tokenThe value returned by the most recent call to GetChangeToken.--ip-set-idThe IPSetId of the IPSet that you want to update.--updatesAn array of IPSetUpdate objects that you want to insert into or delete from an IPSet.