Skip to content

[Cognitive Services] az cognitiveservices: Update shortcut flags for Foundry Project and Cost Control operations - #34483

Open
Darren Cohen (dargilco) wants to merge 2 commits into
Azure:devfrom
dargilco:dargilco/update-cost-control-shortcut
Open

Darren Cohen (dargilco) wants to merge 2 commits into
Azure:devfrom
dargilco:dargilco/update-cost-control-shortcut

Conversation

@dargilco

@dargilco Darren Cohen (dargilco) commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

🤖 PR Validation — ❌ Action needed

Breaking Changes Tests Suppressions
❌ 1 ️✔️ 130/130 ️✔️ None
❌AzureCLI-BreakingChangeTest
❌cognitiveservices
rule cmd_name rule_message suggest_message
❌ 1010 - ParaPropUpdate cognitiveservices account costcontrol create cmd cognitiveservices account costcontrol create update parameter cost_control_name: updated property options from ['--cost-control-name', '--name', '-n'] to ['--cost-control-name', '-c'] please change property options from ['--cost-control-name', '-c'] to ['--cost-control-name', '--name', '-n'] for parameter cost_control_name of cmd cognitiveservices account costcontrol create
❌ 1010 - ParaPropUpdate cognitiveservices account costcontrol delete cmd cognitiveservices account costcontrol delete update parameter cost_control_name: updated property options from ['--cost-control-name', '--name', '-n'] to ['--cost-control-name', '-c'] please change property options from ['--cost-control-name', '-c'] to ['--cost-control-name', '--name', '-n'] for parameter cost_control_name of cmd cognitiveservices account costcontrol delete
❌ 1010 - ParaPropUpdate cognitiveservices account costcontrol head cmd cognitiveservices account costcontrol head update parameter cost_control_name: updated property options from ['--cost-control-name', '--name', '-n'] to ['--cost-control-name', '-c'] please change property options from ['--cost-control-name', '-c'] to ['--cost-control-name', '--name', '-n'] for parameter cost_control_name of cmd cognitiveservices account costcontrol head
❌ 1010 - ParaPropUpdate cognitiveservices account costcontrol show cmd cognitiveservices account costcontrol show update parameter cost_control_name: updated property options from ['--cost-control-name', '--name', '-n'] to ['--cost-control-name', '-c'] please change property options from ['--cost-control-name', '-c'] to ['--cost-control-name', '--name', '-n'] for parameter cost_control_name of cmd cognitiveservices account costcontrol show
❌ 1010 - ParaPropUpdate cognitiveservices account costcontrol update cmd cognitiveservices account costcontrol update update parameter cost_control_name: updated property options from ['--cost-control-name', '--name', '-n'] to ['--cost-control-name', '-c'] please change property options from ['--cost-control-name', '-c'] to ['--cost-control-name', '--name', '-n'] for parameter cost_control_name of cmd cognitiveservices account costcontrol update
❌ 1010 - ParaPropUpdate cognitiveservices account project costcontrol create cmd cognitiveservices account project costcontrol create update parameter cost_control_name: updated property options from ['--cost-control-name', '--name', '-n'] to ['--cost-control-name', '-c'] please change property options from ['--cost-control-name', '-c'] to ['--cost-control-name', '--name', '-n'] for parameter cost_control_name of cmd cognitiveservices account project costcontrol create
❌ 1010 - ParaPropUpdate cognitiveservices account project costcontrol delete cmd cognitiveservices account project costcontrol delete update parameter cost_control_name: updated property options from ['--cost-control-name', '--name', '-n'] to ['--cost-control-name', '-c'] please change property options from ['--cost-control-name', '-c'] to ['--cost-control-name', '--name', '-n'] for parameter cost_control_name of cmd cognitiveservices account project costcontrol delete
❌ 1010 - ParaPropUpdate cognitiveservices account project costcontrol head cmd cognitiveservices account project costcontrol head update parameter cost_control_name: updated property options from ['--cost-control-name', '--name', '-n'] to ['--cost-control-name', '-c'] please change property options from ['--cost-control-name', '-c'] to ['--cost-control-name', '--name', '-n'] for parameter cost_control_name of cmd cognitiveservices account project costcontrol head
❌ 1010 - ParaPropUpdate cognitiveservices account project costcontrol show cmd cognitiveservices account project costcontrol show update parameter cost_control_name: updated property options from ['--cost-control-name', '--name', '-n'] to ['--cost-control-name', '-c'] please change property options from ['--cost-control-name', '-c'] to ['--cost-control-name', '--name', '-n'] for parameter cost_control_name of cmd cognitiveservices account project costcontrol show
❌ 1010 - ParaPropUpdate cognitiveservices account project costcontrol update cmd cognitiveservices account project costcontrol update update parameter cost_control_name: updated property options from ['--cost-control-name', '--name', '-n'] to ['--cost-control-name', '-c'] please change property options from ['--cost-control-name', '-c'] to ['--cost-control-name', '--name', '-n'] for parameter cost_control_name of cmd cognitiveservices account project costcontrol update
⚠️ 1010 - ParaPropUpdate cognitiveservices account costcontrol create cmd cognitiveservices account costcontrol create update parameter account_name: updated property options from ['--account-name'] to ['--account-name', '--name', '-n']
⚠️ 1010 - ParaPropUpdate cognitiveservices account costcontrol delete cmd cognitiveservices account costcontrol delete update parameter account_name: updated property options from ['--account-name'] to ['--account-name', '--name', '-n']
⚠️ 1010 - ParaPropUpdate cognitiveservices account costcontrol head cmd cognitiveservices account costcontrol head update parameter account_name: updated property options from ['--account-name'] to ['--account-name', '--name', '-n']
⚠️ 1010 - ParaPropUpdate cognitiveservices account costcontrol list cmd cognitiveservices account costcontrol list update parameter account_name: updated property options from ['--account-name'] to ['--account-name', '--name', '-n']
⚠️ 1010 - ParaPropUpdate cognitiveservices account costcontrol show cmd cognitiveservices account costcontrol show update parameter account_name: updated property options from ['--account-name'] to ['--account-name', '--name', '-n']
⚠️ 1010 - ParaPropUpdate cognitiveservices account costcontrol update cmd cognitiveservices account costcontrol update update parameter account_name: updated property options from ['--account-name'] to ['--account-name', '--name', '-n']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project connection create cmd cognitiveservices account project connection create update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project connection delete cmd cognitiveservices account project connection delete update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project connection list cmd cognitiveservices account project connection list update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project connection show cmd cognitiveservices account project connection show update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project connection update cmd cognitiveservices account project connection update update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project costcontrol create cmd cognitiveservices account project costcontrol create update parameter account_name: updated property options from ['--account-name'] to ['--account-name', '--name', '-n']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project costcontrol create cmd cognitiveservices account project costcontrol create update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project costcontrol delete cmd cognitiveservices account project costcontrol delete update parameter account_name: updated property options from ['--account-name'] to ['--account-name', '--name', '-n']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project costcontrol delete cmd cognitiveservices account project costcontrol delete update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project costcontrol head cmd cognitiveservices account project costcontrol head update parameter account_name: updated property options from ['--account-name'] to ['--account-name', '--name', '-n']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project costcontrol head cmd cognitiveservices account project costcontrol head update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project costcontrol list cmd cognitiveservices account project costcontrol list update parameter account_name: updated property options from ['--account-name'] to ['--account-name', '--name', '-n']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project costcontrol list cmd cognitiveservices account project costcontrol list update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project costcontrol show cmd cognitiveservices account project costcontrol show update parameter account_name: updated property options from ['--account-name'] to ['--account-name', '--name', '-n']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project costcontrol show cmd cognitiveservices account project costcontrol show update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project costcontrol update cmd cognitiveservices account project costcontrol update update parameter account_name: updated property options from ['--account-name'] to ['--account-name', '--name', '-n']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project costcontrol update cmd cognitiveservices account project costcontrol update update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project create cmd cognitiveservices account project create update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project delete cmd cognitiveservices account project delete update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project show cmd cognitiveservices account project show update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']
⚠️ 1010 - ParaPropUpdate cognitiveservices account project update cmd cognitiveservices account project update update parameter project_name: updated property options from ['--project-name'] to ['--project-name', '-p']

Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:

  • Breaking changes can only be merged during the designated breaking change window
  • A pre-announcement must be released at least one month in advance

For more details on how to introduce breaking changes, refer to the documentation: azure-cli/doc/how_to_introduce_breaking_changes.md

Related command

  • az cognitiveservices account project commands
  • az cognitiveservices account costcontrol commands
  • az cognitiveservices account project costcontrol commands

Description

New Foundry Cost Control commands in preview were recently added. However, flag shortcuts did not align with the shortcuts already used in the az cognitiveservices command group. With this PR, we update the shortcuts such that in all Cost Control commands --name and -n is used for setting account name (instead of Cost Control name), to be consistent with other az cognitiveservices commands. Instead, we use the shortcut -c for the Cost Control name. This is a breaking change only in preview commands, which were just introduced for public preview in the November release, and we would like to do it ASAP before many more customers start using these commands.

We also added shortcut -p for Foundry Project name in all relevant commands. This is an additive change to a stable command.

Fixed GitHub issue #34476

Testing Guide

History Notes

[Cognitive Services] az cognitiveservices account project: Add short flag -p for Foundry project name in all commands in this group
[Cognitive Services] BREADKING CHANGE: az cognitiveservices account costcontrol: Use short flags --name and -n for account name to align with other Cognitive Services commands. Use short flag -c for Cost Control name. Use short flag -p for Foundry project name.
[Cognitive Services] BREADKING CHANGE: az cognitiveservices account project costcontrol: Use short flags --name and -n for account name to align with other Cognitive Services commands. Use short flag -c for Cost Control name. Use short flag -p for Foundry project name.


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI balanced review requested due to automatic review settings November 23, 2026 18:48
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The promised -p alias remains unsupported for standalone account project commands; add it to the shared argument registration or narrow the description and history notes to the updated Cost Control commands.

1 open issue
What changed in this PR

This PR aligns Cost Control argument aliases with other Cognitive Services commands by updating the generated command schemas.

Changes:

  • Reassigns -n and --name from Cost Control name to account name—a breaking change for existing callers.
  • Adds -c for Cost Control names while retaining --cost-control-name.
  • Adds -p for project names in project-scoped Cost Control commands.

Paths below are relative to src/azure-cli/azure/cli/command_modules/cognitiveservices/aaz/latest/cognitiveservices/account/.

File Description
project/​costcontrol/​_update.py Updates account, Cost Control, and project aliases.
project/​costcontrol/​_show.py Updates account, Cost Control, and project aliases.
project/​costcontrol/​_list.py Adds account and project aliases.
project/​costcontrol/​_head.py Updates aliases for project Cost Control existence checks.
project/​costcontrol/​_delete.py Updates account, Cost Control, and project aliases.
project/​costcontrol/​_create.py Updates account, Cost Control, and project aliases.
costcontrol/​_update.py Reassigns account and Cost Control aliases.
costcontrol/​_show.py Reassigns account and Cost Control aliases.
costcontrol/​_list.py Adds -n and --name account aliases.
costcontrol/​_head.py Updates aliases for account Cost Control existence checks.
costcontrol/​_delete.py Reassigns account and Cost Control aliases.
costcontrol/​_create.py Reassigns account and Cost Control aliases.

Review effort: Balanced

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Hi Darren Cohen (@dargilco),
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants