Open benj-ch opened 2 months ago
Thank you for opening this issue, we will look into it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cdnfdsuppgithub, @t-bzhan, @gxue, @TracyYaoYao.
The --add
and --set
parameters are Generic Update Arguments.
The
--add
and--set
parameters are Generic Update Arguments.
And do you know how to use them, @Ptnan7? Never found a way to use --add.
Describe the bug
I have an Azure Front Door Premium, 1 security policy associated to some custom domains. I want to associate 1 more custom domain to the security policy.
I got the following error "az: The command line is too long.":
The command has 8358 characters and PowerShell accepts only 8191.
I have the error with 42 custom-domains but I have thousand of custom domains to associate to the same security policy.
I tried to use only the custom domain name (like my old issue #28379) but it's not working:
ERROR: (LinkedInvalidPropertyId) Property id '99999985-customdomaincustomer-contoso-com' at path 'properties.parameters.associations[0].domains[0].id' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
I saw there is a parameter "--add" on the command but I don't find how to use it (https://learn.microsoft.com/en-us/cli/azure/afd/security-policy?view=azure-cli-latest#az-afd-security-policy-update).
How to manage Azure Front Door with a command line?
Related command
az afd security-policy update --resource-group RSGXXXXXXYYY001-TEMPOR --profile-name LBAXXXXXXYYY001 --endpoint-name LBAXXXXXXYYY001 --route-name "abcdefghijklmno-test-route" --custom-domains /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999985-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999950-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999949-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999916-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999973-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999974-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999991-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999997-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999924-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999969-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999994-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999987-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999906-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999940-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/url01-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999992-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999956-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999918-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999983-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999945-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999946-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999963-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999907-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999917-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999993-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999931-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999926-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999921-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999927-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999920-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999988-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999962-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999914-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999968-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999925-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999958-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999913-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999901-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999941-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999903-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999954-customdomaincustomer-contoso-com /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourcegroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Cdn/profiles/LBAXXXXXXYYY001/customdomains/99999955-customdomaincustomer-contoso-com
OR
az afd security-policy update --resource-group $resourceGroup --profile-name $afd --security-policy-name $securityPolicyName --waf-policy /subscriptions/344dfb5c-7766-44e4-9e87-4c77e0d18354/resourceGroups/RSG839700PASI04-RETAIL/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/SEC839785WAFI12 --domains 99999985-customdomaincustomer-contoso-com
Errors
Issue script & Debug output
Only for the command
az afd security-policy update --resource-group RSGXXXXXXYYY001-TEMPOR --profile-name LBAXXXXXXYYY001 --security-policy-name SECXXXXXXYYY001 --waf-policy /subscriptions/b3012d5c-1b0e-4ccb-b19b-96273f4eb345/resourceGroups/RSGXXXXXXYYY001-TEMPOR/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies/SECXXXXXXYYY001 --domains 99999985-customdomaincustomer-contoso-com
Expected behavior
I want to associate or disassociate any number of custom domains.
Need to know how to use the parameter "--add" or "--remove" to manage the front door.
Environment Summary
Additional context
No response