[Cognitive Services] Upgrade azure-mgmt-cognitiveservices to 15.0.0b1 and add managed-network commands#33132
[Cognitive Services] Upgrade azure-mgmt-cognitiveservices to 15.0.0b1 and add managed-network commands#33132
Conversation
|
Validation for Azure CLI Full Test Starting...
Thanks for your contribution! |
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
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>
|
There was a problem hiding this comment.
Pull request overview
Adds preview CLI support for configuring Cognitive Services (AI Foundry) managed networks and outbound rules, alongside upgrading the azure-mgmt-cognitiveservices SDK dependency to the 15.0.0b1 (2026-01-15-preview) API surface.
Changes:
- Bump
azure-mgmt-cognitiveservicesdependency to15.0.0b1across setup and OS-specific requirements. - Add new preview command groups:
az cognitiveservices account managed-networkand... outbound-rulewith corresponding client factories, params, help, and custom implementations. - Update existing test recordings to the
2026-01-15-previewAPI version; add (currently skipped) scenario tests plus YAML/JSON bulk-set sample inputs.
Reviewed changes
Copilot reviewed 33 out of 39 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/setup.py | Update SDK dependency version for Cognitive Services management plane. |
| src/azure-cli/requirements.py3.windows.txt | Pin upgraded Cognitive Services management SDK version for Windows builds. |
| src/azure-cli/requirements.py3.Linux.txt | Pin upgraded Cognitive Services management SDK version for Linux builds. |
| src/azure-cli/requirements.py3.Darwin.txt | Pin upgraded Cognitive Services management SDK version for macOS builds. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/custom.py | Implement managed-network and outbound-rule custom commands; adjust API properties deserialization; add regenerate key wrapper. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/commands.py | Wire new preview command groups and route keys regenerate to custom implementation. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/_client_factory.py | Add client factories for managed network settings/provisioning and outbound rule operations. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/_params.py | Define CLI arguments for managed-network and outbound-rule commands. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/_help.py | Add help entries and examples for the new managed-network command groups. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/_utils.py | Remap renamed credential parameter keys for SDK 15.x when loading connection definitions. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/linter_exclusions.yml | Add linter exclusions for managed-network parameter test coverage. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_managed_network.py | Add scenario tests for managed-network and outbound-rule flows (currently class-level skipped). |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/data/managed_network/managed_network_outbound_rules.yaml | Add YAML input example for outbound-rule bulk-set tests. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/data/managed_network/managed_network_outbound_rules.json | Add JSON input example for outbound-rule bulk-set tests. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_user_owned_storage.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_private_endpoint.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_private_endpoint_connection.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_model.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_list_usages.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_list_models.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_identity_assign_when_create.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_deployment.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_crud.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_create_api_properties.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_account_public_network_access.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_account_list_usage.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_account_list_skus_legacy.yaml | Re-record to use 2026-01-15-preview api-version. |
| src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/recordings/test_cognitiveservices_account_capabilities.yaml | Re-record to use 2026-01-15-preview api-version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Related command
az cognitiveservices account managed-network
az cognitiveservices account managed-network outbound-rule
Description
Add managed network and outbound rule CLI commands for Azure Cognitive Services (AI Foundry) accounts. These commands enable users to configure network isolation and control egress traffic from managed networks.
Testing Guide
New commands (all marked is_preview=True):
Managed Network:
az cognitiveservices account managed-network create — Create a managed network with isolation mode (allow_internet_outbound / allow_only_approved_outbound) and optional firewall SKU
az cognitiveservices account managed-network update — Update managed network settings
az cognitiveservices account managed-network show — Show managed network settings
az cognitiveservices account managed-network provision-network — Provision the managed network
Outbound Rules:
az cognitiveservices account managed-network outbound-rule list — List outbound rules
az cognitiveservices account managed-network outbound-rule show — Show a specific outbound rule
az cognitiveservices account managed-network outbound-rule remove — Delete an outbound rule
az cognitiveservices account managed-network outbound-rule set — Create/update an outbound rule (FQDN, PrivateEndpoint, or ServiceTag)
az cognitiveservices account managed-network outbound-rule bulk-set — Bulk create/update outbound rules from a YAML or JSON file
SDK dependency: Requires azure-mgmt-cognitiveservices~=15.0.0b1 (API version 2026-01-15-preview). The SDK PR is Azure/azure-sdk-for-python#45942. setup.py has been updated but CI will fail until the SDK is published to PyPI.
Testing Guide
Create a managed network with internet outbound access
az cognitiveservices account managed-network create
-g myResourceGroup -n myAccount
--managed-network allow_internet_outbound
Create with approved outbound only and standard firewall
az cognitiveservices account managed-network create
-g myResourceGroup -n myAccount
--managed-network allow_only_approved_outbound
--firewall-sku Standard
Show managed network settings
az cognitiveservices account managed-network show
-g myResourceGroup -n myAccount
Provision the managed network
az cognitiveservices account managed-network provision-network
-g myResourceGroup -n myAccount
Create an FQDN outbound rule
az cognitiveservices account managed-network outbound-rule set
-g myResourceGroup -n myAccount
--rule my-fqdn-rule --type fqdn
--destination "*.openai.azure.com"
Create a ServiceTag outbound rule
az cognitiveservices account managed-network outbound-rule set
-g myResourceGroup -n myAccount
--rule my-servicetag-rule --type servicetag
--destination '{"serviceTag":"Storage","protocol":"TCP","portRanges":"443"}'
List outbound rules
az cognitiveservices account managed-network outbound-rule list
-g myResourceGroup -n myAccount
Bulk set rules from a YAML file
az cognitiveservices account managed-network outbound-rule bulk-set
-g myResourceGroup -n myAccount
--file rules.yaml
Remove an outbound rule
az cognitiveservices account managed-network outbound-rule remove
-g myResourceGroup -n myAccount
--rule my-fqdn-rule
This 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.