Container for the parameters to the UpdateIPSet operation. Inserts or deletes IPSetDescriptor objects in an IPSet. For each IPSetDescriptor object, you specify the following values:
  • Whether to insert or delete the object from the array. If you want to change an IPSetDescriptor object, you delete the existing object and add a new one.

  • The IP address version, IPv4.

  • The IP address in CIDR notation, for example, 192.0.2.0/24 (for the range of IP addresses from 192.0.2.0 to 192.0.2.255) or 192.0.2.44/32 (for the individual IP address 192.0.2.44).

AWS WAF supports /8, /16, /24, and /32 IP address ranges. For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing.

You use an IPSet to specify which web requests you want to allow or block based on the IP addresses that the requests originated from. For example, if you're receiving a lot of requests from one or a small number of IP addresses and you want to block the requests, you can create an IPSet that specifies those IP addresses, and then configure AWS WAF to block the requests.

To create and configure an IPSet, perform the following steps:

  1. Submit a CreateIPSet request.

  2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateIPSet request.

  3. Submit an UpdateIPSet request to specify the IP addresses that you want AWS WAF to watch for.

When you update an IPSet, you specify the IP addresses that you want to add and/or the IP addresses that you want to delete. If you want to change an IP address, you delete the existing IP address and add the new one.

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide.

Inheritance: AmazonWAFRequest
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.WAF.Model.UpdateIPSetRequest();

            if (cmdletContext.ChangeToken != null)
            {
                request.ChangeToken = cmdletContext.ChangeToken;
            }
            if (cmdletContext.IPSetId != null)
            {
                request.IPSetId = cmdletContext.IPSetId;
            }
            if (cmdletContext.Update != null)
            {
                request.Updates = cmdletContext.Update;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }
示例#2
0
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateIPSet operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateIPSet operation on AmazonWAFClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateIPSet
        ///         operation.</returns>
        public IAsyncResult BeginUpdateIPSet(UpdateIPSetRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new UpdateIPSetRequestMarshaller();
            var unmarshaller = UpdateIPSetResponseUnmarshaller.Instance;

            return BeginInvoke<UpdateIPSetRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
示例#3
0
        /// <summary>
        /// Inserts or deletes <a>IPSetDescriptor</a> objects in an <code>IPSet</code>. For each
        /// <code>IPSetDescriptor</code> object, you specify the following values: 
        /// 
        ///  <ul> <li>Whether to insert or delete the object from the array. If you want to change
        /// an <code>IPSetDescriptor</code> object, you delete the existing object and add a new
        /// one.</li> <li>The IP address version, <code>IPv4</code>. </li> <li>The IP address
        /// in CIDR notation, for example, <code>192.0.2.0/24</code> (for the range of IP addresses
        /// from <code>192.0.2.0</code> to <code>192.0.2.255</code>) or <code>192.0.2.44/32</code>
        /// (for the individual IP address <code>192.0.2.44</code>). </li> </ul> 
        /// <para>
        /// AWS WAF supports /8, /16, /24, and /32 IP address ranges. 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>.
        /// </para>
        ///  
        /// <para>
        /// You use an <code>IPSet</code> to specify which web requests you want to allow or block
        /// based on the IP addresses that the requests originated from. For example, if you're
        /// receiving a lot of requests from one or a small number of IP addresses and you want
        /// to block the requests, you can create an <code>IPSet</code> that specifies those IP
        /// addresses, and then configure AWS WAF to block the requests. 
        /// </para>
        ///  
        /// <para>
        /// To create and configure an <code>IPSet</code>, perform the following steps:
        /// </para>
        ///  <ol> <li>Submit a <a>CreateIPSet</a> request.</li> <li>Use <a>GetChangeToken</a>
        /// to get the change token that you provide in the <code>ChangeToken</code> parameter
        /// of an <a>UpdateIPSet</a> request.</li> <li>Submit an <code>UpdateIPSet</code> request
        /// to specify the IP addresses that you want AWS WAF to watch for.</li> </ol> 
        /// <para>
        /// When you update an <code>IPSet</code>, you specify the IP addresses that you want
        /// to add and/or the IP addresses that you want to delete. If you want to change an IP
        /// address, you delete the existing IP address and add the new one.
        /// </para>
        ///  
        /// <para>
        /// For more information about how to use the AWS WAF API to allow or block HTTP requests,
        /// see the <a href="http://docs.aws.amazon.com/waf/latest/developerguide/">AWS WAF Developer
        /// Guide</a>.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the UpdateIPSet service method.</param>
        /// 
        /// <returns>The response from the UpdateIPSet service method, as returned by WAF.</returns>
        /// <exception cref="Amazon.WAF.Model.WAFInternalErrorException">
        /// The operation failed because of a system problem, even though the request was valid.
        /// Retry your request.
        /// </exception>
        /// <exception cref="Amazon.WAF.Model.WAFInvalidAccountException">
        /// The operation failed because you tried to create, update, or delete an object by using
        /// an invalid account identifier.
        /// </exception>
        /// <exception cref="Amazon.WAF.Model.WAFInvalidOperationException">
        /// The operation failed because there was nothing to do. For example:
        /// 
        ///  <ul> <li>You tried to remove a <code>Rule</code> from a <code>WebACL</code>, but
        /// the <code>Rule</code> isn't in the specified <code>WebACL</code>.</li> <li>You tried
        /// to remove an IP address from an <code>IPSet</code>, but the IP address isn't in the
        /// specified <code>IPSet</code>.</li> <li>You tried to remove a <code>ByteMatchTuple</code>
        /// from a <code>ByteMatchSet</code>, but the <code>ByteMatchTuple</code> isn't in the
        /// specified <code>WebACL</code>.</li> <li>You tried to add a <code>Rule</code> to a
        /// <code>WebACL</code>, but the <code>Rule</code> already exists in the specified <code>WebACL</code>.</li>
        /// <li>You tried to add an IP address to an <code>IPSet</code>, but the IP address already
        /// exists in the specified <code>IPSet</code>.</li> <li>You tried to add a <code>ByteMatchTuple</code>
        /// to a <code>ByteMatchSet</code>, but the <code>ByteMatchTuple</code> already exists
        /// in the specified <code>WebACL</code>.</li> </ul>
        /// </exception>
        /// <exception cref="Amazon.WAF.Model.WAFInvalidParameterException">
        /// The operation failed because AWS WAF didn't recognize a parameter in the request.
        /// For example:
        /// 
        ///  <ul> <li>You specified an invalid parameter name.</li> <li>You specified an invalid
        /// value.</li> <li>You tried to update an object (<code>ByteMatchSet</code>, <code>IPSet</code>,
        /// <code>Rule</code>, or <code>WebACL</code>) using an action other than <code>INSERT</code>
        /// or <code>DELETE</code>.</li> <li>You tried to create a <code>WebACL</code> with a
        /// <code>DefaultAction</code> <code>Type</code> other than <code>ALLOW</code>, <code>BLOCK</code>,
        /// or <code>COUNT</code>.</li> <li>You tried to update a <code>WebACL</code> with a <code>WafAction</code>
        /// <code>Type</code> other than <code>ALLOW</code>, <code>BLOCK</code>, or <code>COUNT</code>.</li>
        /// <li>You tried to update a <code>ByteMatchSet</code> with a <code>FieldToMatch</code>
        /// <code>Type</code> other than HEADER, QUERY_STRING, or URI.</li> <li>You tried to update
        /// a <code>ByteMatchSet</code> with a <code>Field</code> of <code>HEADER</code> but no
        /// value for <code>Data</code>.</li> </ul>
        /// </exception>
        /// <exception cref="Amazon.WAF.Model.WAFLimitsExceededException">
        /// The operation exceeds a resource limit, for example, the maximum number of <code>WebACL</code>
        /// objects that you can create for an AWS account. For more information, see <a href="http://docs.aws.amazon.com/waf/latest/DeveloperGuide/limits.html">Limits</a>
        /// in the <i>AWS WAF Developer Guide</i>.
        /// </exception>
        /// <exception cref="Amazon.WAF.Model.WAFNonexistentContainerException">
        /// The operation failed because you tried to add an object to or delete an object from
        /// another object that doesn't exist. For example:
        /// 
        ///  <ul> <li>You tried to add a <code>Rule</code> to or delete a <code>Rule</code> from
        /// a <code>WebACL</code> that doesn't exist.</li> <li>You tried to add a <code>ByteMatchSet</code>
        /// to or delete a <code>ByteMatchSet</code> from a <code>Rule</code> that doesn't exist.</li>
        /// <li>You tried to add an IP address to or delete an IP address from an <code>IPSet</code>
        /// that doesn't exist.</li> <li>You tried to add a <code>ByteMatchTuple</code> to or
        /// delete a <code>ByteMatchTuple</code> from a <code>ByteMatchSet</code> that doesn't
        /// exist.</li> </ul>
        /// </exception>
        /// <exception cref="Amazon.WAF.Model.WAFNonexistentItemException">
        /// The operation failed because the referenced object doesn't exist.
        /// </exception>
        /// <exception cref="Amazon.WAF.Model.WAFReferencedItemException">
        /// The operation failed because you tried to delete an object that is still in use. For
        /// example: <ul> <li>You tried to delete a <code>ByteMatchSet</code> that is still referenced
        /// by a <code>Rule</code>.</li> <li>You tried to delete a <code>Rule</code> that is still
        /// referenced by a <code>WebACL</code>.</li> </ul>
        /// </exception>
        /// <exception cref="Amazon.WAF.Model.WAFStaleDataException">
        /// The operation failed because you tried to create, update, or delete an object by using
        /// a change token that has already been used.
        /// </exception>
        public UpdateIPSetResponse UpdateIPSet(UpdateIPSetRequest request)
        {
            var marshaller = new UpdateIPSetRequestMarshaller();
            var unmarshaller = UpdateIPSetResponseUnmarshaller.Instance;

            return Invoke<UpdateIPSetRequest,UpdateIPSetResponse>(request, marshaller, unmarshaller);
        }
示例#4
0
 /// <summary>
 /// Inserts or deletes <a>IPSetDescriptor</a> objects in an <code>IPSet</code>. For each
 /// <code>IPSetDescriptor</code> object, you specify the following values: 
 /// 
 ///  <ul> <li>Whether to insert or delete the object from the array. If you want to change
 /// an <code>IPSetDescriptor</code> object, you delete the existing object and add a new
 /// one.</li> <li>The IP address version, <code>IPv4</code>. </li> <li>The IP address
 /// in CIDR notation, for example, <code>192.0.2.0/24</code> (for the range of IP addresses
 /// from <code>192.0.2.0</code> to <code>192.0.2.255</code>) or <code>192.0.2.44/32</code>
 /// (for the individual IP address <code>192.0.2.44</code>). </li> </ul> 
 /// <para>
 /// AWS WAF supports /8, /16, /24, and /32 IP address ranges. 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>.
 /// </para>
 ///  
 /// <para>
 /// You use an <code>IPSet</code> to specify which web requests you want to allow or block
 /// based on the IP addresses that the requests originated from. For example, if you're
 /// receiving a lot of requests from one or a small number of IP addresses and you want
 /// to block the requests, you can create an <code>IPSet</code> that specifies those IP
 /// addresses, and then configure AWS WAF to block the requests. 
 /// </para>
 ///  
 /// <para>
 /// To create and configure an <code>IPSet</code>, perform the following steps:
 /// </para>
 ///  <ol> <li>Submit a <a>CreateIPSet</a> request.</li> <li>Use <a>GetChangeToken</a>
 /// to get the change token that you provide in the <code>ChangeToken</code> parameter
 /// of an <a>UpdateIPSet</a> request.</li> <li>Submit an <code>UpdateIPSet</code> request
 /// to specify the IP addresses that you want AWS WAF to watch for.</li> </ol> 
 /// <para>
 /// When you update an <code>IPSet</code>, you specify the IP addresses that you want
 /// to add and/or the IP addresses that you want to delete. If you want to change an IP
 /// address, you delete the existing IP address and add the new one.
 /// </para>
 ///  
 /// <para>
 /// For more information about how to use the AWS WAF API to allow or block HTTP requests,
 /// see the <a href="http://docs.aws.amazon.com/waf/latest/developerguide/">AWS WAF Developer
 /// Guide</a>.
 /// </para>
 /// </summary>
 /// <param name="ipSetId">The <code>IPSetId</code> of the <a>IPSet</a> that you want to update. <code>IPSetId</code> is returned by <a>CreateIPSet</a> and by <a>ListIPSets</a>.</param>
 /// <param name="updates">An array of <code>IPSetUpdate</code> objects that you want to insert into or delete from an <a>IPSet</a>. For more information, see the applicable data types: <ul> <li> <a>IPSetUpdate</a>: Contains <code>Action</code> and <code>IPSetDescriptor</code> </li> <li> <a>IPSetDescriptor</a>: Contains <code>Type</code> and <code>Value</code> </li> </ul></param>
 /// <param name="changeToken">The value returned by the most recent call to <a>GetChangeToken</a>.</param>
 /// 
 /// <returns>The response from the UpdateIPSet service method, as returned by WAF.</returns>
 /// <exception cref="Amazon.WAF.Model.WAFInternalErrorException">
 /// The operation failed because of a system problem, even though the request was valid.
 /// Retry your request.
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFInvalidAccountException">
 /// The operation failed because you tried to create, update, or delete an object by using
 /// an invalid account identifier.
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFInvalidOperationException">
 /// The operation failed because there was nothing to do. For example:
 /// 
 ///  <ul> <li>You tried to remove a <code>Rule</code> from a <code>WebACL</code>, but
 /// the <code>Rule</code> isn't in the specified <code>WebACL</code>.</li> <li>You tried
 /// to remove an IP address from an <code>IPSet</code>, but the IP address isn't in the
 /// specified <code>IPSet</code>.</li> <li>You tried to remove a <code>ByteMatchTuple</code>
 /// from a <code>ByteMatchSet</code>, but the <code>ByteMatchTuple</code> isn't in the
 /// specified <code>WebACL</code>.</li> <li>You tried to add a <code>Rule</code> to a
 /// <code>WebACL</code>, but the <code>Rule</code> already exists in the specified <code>WebACL</code>.</li>
 /// <li>You tried to add an IP address to an <code>IPSet</code>, but the IP address already
 /// exists in the specified <code>IPSet</code>.</li> <li>You tried to add a <code>ByteMatchTuple</code>
 /// to a <code>ByteMatchSet</code>, but the <code>ByteMatchTuple</code> already exists
 /// in the specified <code>WebACL</code>.</li> </ul>
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFInvalidParameterException">
 /// The operation failed because AWS WAF didn't recognize a parameter in the request.
 /// For example:
 /// 
 ///  <ul> <li>You specified an invalid parameter name.</li> <li>You specified an invalid
 /// value.</li> <li>You tried to update an object (<code>ByteMatchSet</code>, <code>IPSet</code>,
 /// <code>Rule</code>, or <code>WebACL</code>) using an action other than <code>INSERT</code>
 /// or <code>DELETE</code>.</li> <li>You tried to create a <code>WebACL</code> with a
 /// <code>DefaultAction</code> <code>Type</code> other than <code>ALLOW</code>, <code>BLOCK</code>,
 /// or <code>COUNT</code>.</li> <li>You tried to update a <code>WebACL</code> with a <code>WafAction</code>
 /// <code>Type</code> other than <code>ALLOW</code>, <code>BLOCK</code>, or <code>COUNT</code>.</li>
 /// <li>You tried to update a <code>ByteMatchSet</code> with a <code>FieldToMatch</code>
 /// <code>Type</code> other than HEADER, QUERY_STRING, or URI.</li> <li>You tried to update
 /// a <code>ByteMatchSet</code> with a <code>Field</code> of <code>HEADER</code> but no
 /// value for <code>Data</code>.</li> </ul>
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFLimitsExceededException">
 /// The operation exceeds a resource limit, for example, the maximum number of <code>WebACL</code>
 /// objects that you can create for an AWS account. For more information, see <a href="http://docs.aws.amazon.com/waf/latest/DeveloperGuide/limits.html">Limits</a>
 /// in the <i>AWS WAF Developer Guide</i>.
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFNonexistentContainerException">
 /// The operation failed because you tried to add an object to or delete an object from
 /// another object that doesn't exist. For example:
 /// 
 ///  <ul> <li>You tried to add a <code>Rule</code> to or delete a <code>Rule</code> from
 /// a <code>WebACL</code> that doesn't exist.</li> <li>You tried to add a <code>ByteMatchSet</code>
 /// to or delete a <code>ByteMatchSet</code> from a <code>Rule</code> that doesn't exist.</li>
 /// <li>You tried to add an IP address to or delete an IP address from an <code>IPSet</code>
 /// that doesn't exist.</li> <li>You tried to add a <code>ByteMatchTuple</code> to or
 /// delete a <code>ByteMatchTuple</code> from a <code>ByteMatchSet</code> that doesn't
 /// exist.</li> </ul>
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFNonexistentItemException">
 /// The operation failed because the referenced object doesn't exist.
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFReferencedItemException">
 /// The operation failed because you tried to delete an object that is still in use. For
 /// example: <ul> <li>You tried to delete a <code>ByteMatchSet</code> that is still referenced
 /// by a <code>Rule</code>.</li> <li>You tried to delete a <code>Rule</code> that is still
 /// referenced by a <code>WebACL</code>.</li> </ul>
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFStaleDataException">
 /// The operation failed because you tried to create, update, or delete an object by using
 /// a change token that has already been used.
 /// </exception>
 public UpdateIPSetResponse UpdateIPSet(string ipSetId, List<IPSetUpdate> updates, string changeToken)
 {
     var request = new UpdateIPSetRequest();
     request.IPSetId = ipSetId;
     request.Updates = updates;
     request.ChangeToken = changeToken;
     return UpdateIPSet(request);
 }
示例#5
0
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateIPSet operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateIPSet operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task<UpdateIPSetResponse> UpdateIPSetAsync(UpdateIPSetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateIPSetRequestMarshaller();
            var unmarshaller = UpdateIPSetResponseUnmarshaller.Instance;

            return InvokeAsync<UpdateIPSetRequest,UpdateIPSetResponse>(request, marshaller,
                unmarshaller, cancellationToken);
        }
示例#6
0
 /// <summary>
 /// Inserts or deletes <a>IPSetDescriptor</a> objects in an <code>IPSet</code>. For each
 /// <code>IPSetDescriptor</code> object, you specify the following values: 
 /// 
 ///  <ul> <li>Whether to insert or delete the object from the array. If you want to change
 /// an <code>IPSetDescriptor</code> object, you delete the existing object and add a new
 /// one.</li> <li>The IP address version, <code>IPv4</code>. </li> <li>The IP address
 /// in CIDR notation, for example, <code>192.0.2.0/24</code> (for the range of IP addresses
 /// from <code>192.0.2.0</code> to <code>192.0.2.255</code>) or <code>192.0.2.44/32</code>
 /// (for the individual IP address <code>192.0.2.44</code>). </li> </ul> 
 /// <para>
 /// AWS WAF supports /8, /16, /24, and /32 IP address ranges. 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>.
 /// </para>
 ///  
 /// <para>
 /// You use an <code>IPSet</code> to specify which web requests you want to allow or block
 /// based on the IP addresses that the requests originated from. For example, if you're
 /// receiving a lot of requests from one or a small number of IP addresses and you want
 /// to block the requests, you can create an <code>IPSet</code> that specifies those IP
 /// addresses, and then configure AWS WAF to block the requests. 
 /// </para>
 ///  
 /// <para>
 /// To create and configure an <code>IPSet</code>, perform the following steps:
 /// </para>
 ///  <ol> <li>Submit a <a>CreateIPSet</a> request.</li> <li>Use <a>GetChangeToken</a>
 /// to get the change token that you provide in the <code>ChangeToken</code> parameter
 /// of an <a>UpdateIPSet</a> request.</li> <li>Submit an <code>UpdateIPSet</code> request
 /// to specify the IP addresses that you want AWS WAF to watch for.</li> </ol> 
 /// <para>
 /// When you update an <code>IPSet</code>, you specify the IP addresses that you want
 /// to add and/or the IP addresses that you want to delete. If you want to change an IP
 /// address, you delete the existing IP address and add the new one.
 /// </para>
 ///  
 /// <para>
 /// For more information about how to use the AWS WAF API to allow or block HTTP requests,
 /// see the <a href="http://docs.aws.amazon.com/waf/latest/developerguide/">AWS WAF Developer
 /// Guide</a>.
 /// </para>
 /// </summary>
 /// <param name="ipSetId">The <code>IPSetId</code> of the <a>IPSet</a> that you want to update. <code>IPSetId</code> is returned by <a>CreateIPSet</a> and by <a>ListIPSets</a>.</param>
 /// <param name="updates">An array of <code>IPSetUpdate</code> objects that you want to insert into or delete from an <a>IPSet</a>. For more information, see the applicable data types: <ul> <li><a>IPSetUpdate</a>: Contains <code>Action</code> and <code>IPSetDescriptor</code></li> <li><a>IPSetDescriptor</a>: Contains <code>Type</code> and <code>Value</code></li> </ul></param>
 /// <param name="changeToken">The value returned by the most recent call to <a>GetChangeToken</a>.</param>
 /// <param name="cancellationToken">
 ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
 /// </param>
 /// 
 /// <returns>The response from the UpdateIPSet service method, as returned by WAF.</returns>
 /// <exception cref="Amazon.WAF.Model.WAFInternalErrorException">
 /// The operation failed because of a system problem, even though the request was valid.
 /// Retry your request.
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFInvalidAccountException">
 /// The operation failed because you tried to create, update, or delete an object by using
 /// an invalid account identifier.
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFInvalidOperationException">
 /// The operation failed because there was nothing to do. For example:
 /// 
 ///  <ul> <li>You tried to remove a <code>Rule</code> from a <code>WebACL</code>, but
 /// the <code>Rule</code> isn't in the specified <code>WebACL</code>.</li> <li>You tried
 /// to remove an IP address from an <code>IPSet</code>, but the IP address isn't in the
 /// specified <code>IPSet</code>.</li> <li>You tried to remove a <code>ByteMatchTuple</code>
 /// from a <code>ByteMatchSet</code>, but the <code>ByteMatchTuple</code> isn't in the
 /// specified <code>WebACL</code>.</li> <li>You tried to add a <code>Rule</code> to a
 /// <code>WebACL</code>, but the <code>Rule</code> already exists in the specified <code>WebACL</code>.</li>
 /// <li>You tried to add an IP address to an <code>IPSet</code>, but the IP address already
 /// exists in the specified <code>IPSet</code>.</li> <li>You tried to add a <code>ByteMatchTuple</code>
 /// to a <code>ByteMatchSet</code>, but the <code>ByteMatchTuple</code> already exists
 /// in the specified <code>WebACL</code>.</li> </ul>
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFInvalidParameterException">
 /// The operation failed because AWS WAF didn't recognize a parameter in the request.
 /// For example:
 /// 
 ///  <ul> <li>You specified an invalid parameter name.</li> <li>You specified an invalid
 /// value.</li> <li>You tried to update an object (<code>ByteMatchSet</code>, <code>IPSet</code>,
 /// <code>Rule</code>, or <code>WebACL</code>) using an action other than <code>INSERT</code>
 /// or <code>DELETE</code>.</li> <li>You tried to create a <code>WebACL</code> with a
 /// <code>DefaultAction</code> <code>Type</code> other than <code>ALLOW</code>, <code>BLOCK</code>,
 /// or <code>COUNT</code>.</li> <li>You tried to update a <code>WebACL</code> with a <code>WafAction</code>
 /// <code>Type</code> other than <code>ALLOW</code>, <code>BLOCK</code>, or <code>COUNT</code>.</li>
 /// <li>You tried to update a <code>ByteMatchSet</code> with a <code>FieldToMatch</code>
 /// <code>Type</code> other than HEADER, QUERY_STRING, or URI.</li> <li>You tried to update
 /// a <code>ByteMatchSet</code> with a <code>Field</code> of <code>HEADER</code> but no
 /// value for <code>Data</code>.</li> </ul>
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFLimitsExceededException">
 /// The operation exceeds a resource limit, for example, the maximum number of <code>WebACL</code>
 /// objects that you can create for an AWS account. For more information, see <a href="http://docs.aws.amazon.com/waf/latest/developerguide/limits.html">Limits</a>
 /// in the <i>AWS WAF Developer Guide</i>.
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFNonexistentContainerException">
 /// The operation failed because you tried to add an object to or delete an object from
 /// another object that doesn't exist. For example:
 /// 
 ///  <ul> <li>You tried to add a <code>Rule</code> to or delete a <code>Rule</code> from
 /// a <code>WebACL</code> that doesn't exist.</li> <li>You tried to add a <code>ByteMatchSet</code>
 /// to or delete a <code>ByteMatchSet</code> from a <code>Rule</code> that doesn't exist.</li>
 /// <li>You tried to add an IP address to or delete an IP address from an <code>IPSet</code>
 /// that doesn't exist.</li> <li>You tried to add a <code>ByteMatchTuple</code> to or
 /// delete a <code>ByteMatchTuple</code> from a <code>ByteMatchSet</code> that doesn't
 /// exist.</li> </ul>
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFNonexistentItemException">
 /// The operation failed because the referenced object doesn't exist.
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFReferencedItemException">
 /// The operation failed because you tried to delete an object that is still in use. For
 /// example: <ul> <li>You tried to delete a <code>ByteMatchSet</code> that is still referenced
 /// by a <code>Rule</code>.</li> <li>You tried to delete a <code>Rule</code> that is still
 /// referenced by a <code>WebACL</code>.</li> </ul>
 /// </exception>
 /// <exception cref="Amazon.WAF.Model.WAFStaleDataException">
 /// The operation failed because you tried to create, update, or delete an object by using
 /// a change token that has already been used.
 /// </exception>
 public Task<UpdateIPSetResponse> UpdateIPSetAsync(string ipSetId, List<IPSetUpdate> updates, string changeToken, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new UpdateIPSetRequest();
     request.IPSetId = ipSetId;
     request.Updates = updates;
     request.ChangeToken = changeToken;
     return UpdateIPSetAsync(request, cancellationToken);
 }
 private Amazon.WAF.Model.UpdateIPSetResponse CallAWSServiceOperation(IAmazonWAF client, Amazon.WAF.Model.UpdateIPSetRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS WAF", "UpdateIPSet");
     try
     {
         #if DESKTOP
         return(client.UpdateIPSet(request));
         #elif CORECLR
         return(client.UpdateIPSetAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }