FirewallPolicyRuleCollectionGroups.createOrUpdate — ~25 polls and ~4 minutes

Dvora Fridman 0 Reputation points
2026-08-26T12:06:00.9833333+00:00

Hi,

We provision Azure Firewall Policy rules programmatically and see a consistent ~4 minute wall-clock cost to update a single rule collection group.

The PUT itself is accepted in about a second; the rest is the long-running operation.

I'd like to understand what that time represents.

## Setup

Java, using the Azure SDK for Java:

com.azure.resourcemanager:azure-resourcemanager-network : 2.50.0

com.azure:azure-core : 1.55.3

com.azure:azure-identity : 1.12.2

## Setup

Authentication is ClientSecretCredential against a service principal, with a

custom HttpPipeline (BearerTokenAuthenticationPolicy + RetryPolicy +

HttpLoggingPolicy), then:

NetworkManager.authenticate(pipeline, azureProfile)

  .serviceClient()

  .getFirewallPolicyRuleCollectionGroups()

The methods we call:

FirewallPolicyRuleCollectionGroupsClient.list(resourceGroupName, policyName)

FirewallPolicyRuleCollectionGroupsClient.get(resourceGroupName, policyName, groupName)

FirewallPolicyRuleCollectionGroupsClient.createOrUpdate(

  resourceGroupName, policyName, groupName, FirewallPolicyRuleCollectionGroupInner)

i.e. the underlying REST call is

PUT .../firewallPolicies/{policy}/ruleCollectionGroups/{group}

Since the SDK exposes no per-rule endpoint, adding or editing a single network rule

means a read-modify-write of the whole rule collection group.

## What we see

A single rule collection group update, adding one network rule:

GET ruleCollectionGroups (list) 0.5 s

GET ruleCollectionGroups/{group} 0.5 s

PUT ruleCollectionGroups/{group} -> accepted 1.1 s

~25 poll GETs at 10 s intervals 4 m 02 s


total 4 m 17 s

So the API calls account for ~2.6 s, and the remaining ~4 minutes is the SDK

polling provisioningState until the operation reports success.

## Questions

  1. Is ~4 minutes the expected completion time for a rule collection group createOrUpdate, or does it suggest something misconfigured on our side?
  2. Does the long-running operation complete only once the change has been rolled out to the firewall data plane, rather than when the control plane has accepted it?
  3. Does the duration scale with the number of Azure Firewalls attached to the policy, or with the total number of rules already in the policy?
  4. Is there a supported way to get control-plane acceptance without blocking for the full rollout — so a caller can return and verify completion later?

Thanks!

Azure Firewall Manager
Azure Firewall Manager

An Azure service that provides central network security policy and route management for globally distributed, software-defined perimeters.


1 answer

Sort by: Most helpful
  1. Sina Salam 31,456 Reputation points Volunteer Moderator
    2026-08-26T17:15:55.54+00:00

    Hello Dvora Fridman,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that the initial PUT is accepted in about one second, but the Java FirewallPolicyRuleCollectionGroupsClient.createOrUpdate(...) call continues polling for approximately four minutes.

    This does not currently indicate a client-side misconfiguration. The create/update REST operation is asynchronous and returns Azure-AsyncOperation and Retry-After headers. The synchronous Java createOrUpdate(...) method waits for that operation to finish. Microsoft also documents that individual Azure Firewall Policy changes can take several minutes to deploy, so the observed four-minute duration is consistent with documented behavior, although Microsoft does not publish a fixed completion-time SLA for this operation.

    For a nonblocking submission, use the Java SDK’s beginCreateOrUpdate(...) method:

    SyncPoller<
        PollResult<FirewallPolicyRuleCollectionGroupInner>,
        FirewallPolicyRuleCollectionGroupInner
    > poller =
        client.beginCreateOrUpdate(
            resourceGroupName,
            firewallPolicyName,
            ruleCollectionGroupName,
            parameters
        );
    

    Ensure that you:

    1. Replace createOrUpdate(...) with beginCreateOrUpdate(...).
    2. Poll using the returned handle.
    3. Persist the resource identifiers and query the RCG.
    4. Confirm the returned RCG contains the intended rule, then run a controlled matching traffic test.
    5. Batch frequent updates where suitable, if numerous incremental edits are being made, evaluate Draft + Deployment.

    This returns a poller instead of waiting for completion. In the same process, call poller.poll() periodically and obtain the final result only after the status is SUCCESSFULLY_COMPLETED. The Java client documents both beginCreateOrUpdate(...) and beginCreateOrUpdateAsync(...) for this purpose.

    If a different worker or a later process must verify completion, persist the policy and Rule Collection Group identifiers, call get(...), and inspect properties.provisioningState. A Succeeded state confirms completion of the resource-provider operation. If actual traffic enforcement is business-critical, verify it separately with a controlled flow matching the changed rule rather than assuming that provisioning state alone proves the observed data-plane result.

    Microsoft does not publish a formula showing how this duration varies with total rule count or the number of firewalls using the policy, so no linear scaling relationship should be assumed. For frequent changes, consider Azure Firewall Draft + Deployment to batch multiple edits into one deployment, subject to its documented limitations.

    You can Open a support request via your Azure Portal or contact priority customer support (PCS), if it becomes stuck or fails, or if Succeeded is followed by a reproducible failure to enforce the updated rule; this might depend on your support level.

    I hope this is helpful. Please! Do not hesitate to let me know if you have any other questions, steps or clarifications.


    Please do not close the thread by upvoting and accepting the answer if any part of it is helpful.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.