-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[APIM] az apim policy: Add support for managing APIM policies
#31457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @FilPag, |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| apim policy | sub group apim policy added |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
az apim policy: **Add** support for managing APIM policiesaz apim policy: Add support for managing APIM policies
|
Thank you for your contribution @FilPag! We will review the pull request and get back to you soon. |
|
@microsoft-github-policy-service agree |
|
Commenter does not have sufficient privileges for PR 31457 in repo Azure/azure-cli |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
az apim policy: Add support for managing APIM policiesaz apim policy: Add support for managing APIM policies
|
@FilPag please note that Azure CLI will have a code freeze on 05/27/2025 07:00 UTC for the upcoming release. Please address these comments ASAP, otherwise it has to be postponed to next sprint (07-01). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive support for managing Azure API Management (APIM) policies through a new az apim policy command group. The implementation includes commands for setting, showing, deleting, listing, and getting etags for policies at different scopes (global, API, and operation levels).
Key changes include:
- New policy management commands with support for multiple scopes
- Test infrastructure fixes including resource group preparer tag handling
- Updated test data paths and removed unused test dependencies
Reviewed Changes
Copilot reviewed 8 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/apim/custom.py | Implements core policy operations with scope-aware context handling |
| src/azure-cli/azure/cli/command_modules/apim/commands.py | Registers the new policy command group with appropriate client factory |
| src/azure-cli/azure/cli/command_modules/apim/_params.py | Defines command parameters for policy operations including format and scope options |
| src/azure-cli/azure/cli/command_modules/apim/_help.py | Provides comprehensive help documentation and usage examples for policy commands |
| src/azure-cli/azure/cli/command_modules/apim/_client_factory.py | Adds client factory for policy operations |
| src/azure-cli/azure/cli/command_modules/apim/tests/latest/test_apim_scenario.py | Adds comprehensive policy operation tests and fixes existing test issues |
| src/azure-cli/azure/cli/command_modules/apim/tests/latest/data/api_policy.xml | Test policy file for validation scenarios |
| src/azure-cli-testsdk/azure/cli/testsdk/preparers.py | Fixes tag handling bug in resource group preparer |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
7eb7fff to
4683fe2
Compare
|
Thank you for the reviews! Since my time has become more limited in recent weeks, I won't be able to generate new recordings for the tests in case anything has broken over the last few months. If anyone could help with this (if needed), it would be greatly appreciated. Best regards, |
|
Please note that the Azure CLI release process will begin on 09/30/2025 at 07:00 UTC. If this PR is intended for the upcoming release, kindly resolve the comments as soon as possible, otherwise it will need to be postponed to the next sprint. |
|
@FilPag Any update? |
Related command
az apim policyDescription
Testing Guide
azdev test apimThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.