az cognitiveservices account project costcontrol
This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage Foundry project-owned cost controls.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az cognitiveservices account project costcontrol create |
Create a Foundry project-owned const control. |
Core | Preview |
| az cognitiveservices account project costcontrol delete |
Delete a project-owned cost control. |
Core | Preview |
| az cognitiveservices account project costcontrol head |
Checks whether a project-owned cost control exists without returning its body. |
Core | Preview |
| az cognitiveservices account project costcontrol list |
List project-owned cost controls. |
Core | Preview |
| az cognitiveservices account project costcontrol show |
Get a project-owned cost control and its representation entity tag. |
Core | Preview |
| az cognitiveservices account project costcontrol update |
Updates a Foundry project-owned const control. |
Core | Preview |
az cognitiveservices account project costcontrol create
Command group 'az cognitiveservices account project costcontrol' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a Foundry project-owned const control.
Create a Foundry project-owned const control. The definition may contain at most one notification, including disabled notifications, and one Block action. Exceeding either limit returns HTTP 400 without persisting the request.
az cognitiveservices account project costcontrol create --account-name
--cost-control-name --name
--project-name
--resource-group
[--acquire-policy-token]
[--amount]
[--category {Cost, Tokens}]
[--change-reference]
[--filter]
[--grouping]
[--if-match]
[--if-none-match]
[--notifications]
[--provider {Microsoft.CognitiveServices}]
[--provider-properties]
[--time-grain {Daily, Monthly, Weekly}]
[--time-period]
Examples
Create or replace a project token budget
az cognitiveservices account project costcontrol create --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget --if-none-match * --category Tokens --amount 1000000 --time-grain Daily --time-period "{start-date:'2026-11-15T00:00:00Z',end-date:'2027-11-15T00:00:00Z'}" --filter "{additionalInfo:{name:tokenType,operator:In,values:[input,output]}}" --notifications "{usageAlert:{eventGridConnectionId:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,thresholdType:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stopRequests:{type:Block,thresholdType:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}"
Required Parameters
The name of Cognitive Services account.
The cost-control name. Names contain 1-63 ASCII letters, numbers, underscores, or hyphens, including a leading underscore or hyphen.
The name of Cognitive Services account's project.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The positive budget amount, measured in United States dollars for the Cost category or in tokens for the Tokens category. Token amounts must be whole numbers.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Whether the budget measures estimated cost in United States dollars or token consumption. This category cannot be changed after creation.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
| Accepted values: | Cost, Tokens |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Optional traffic selection. Omission selects all eligible traffic within the owner's scope. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Optional additional partitioning of consumption. Omission or an empty array uses one counter for the owning account or Foundry project. Responses omit owner-default grouping. A project-owned control cannot explicitly group by project. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Proceeds only if the current entity tag matches this value.
Proceeds only if the current entity tag does not match this value. Use * to create only if absent.
Alert notifications keyed by nonempty, case-insensitively unique names. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The resource provider for this budget. Omission selects Microsoft.CognitiveServices; responses return that value.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
| Accepted values: | Microsoft.CognitiveServices |
Optional provider-specific enforcement settings. Omission creates no blocking actions. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The calendar-aligned UTC interval at which consumption counters renew within the validity window.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
| Accepted values: | Daily, Monthly, Weekly |
The finite UTC validity window during which the control applies. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az cognitiveservices account project costcontrol delete
Command group 'az cognitiveservices account project costcontrol' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete a project-owned cost control.
az cognitiveservices account project costcontrol delete [--account-name]
[--acquire-policy-token]
[--change-reference]
[--cost-control-name --name]
[--ids]
[--if-match]
[--project-name]
[--resource-group]
[--subscription]
[--yes]
Examples
Delete a budget conditionally
az cognitiveservices account project costcontrol delete --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget --if-match "00000000-0000-0000-0000-000000000001"
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The name of Cognitive Services account.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The cost-control name. Names contain 1-63 ASCII letters, numbers, underscores, or hyphens, including a leading underscore or hyphen.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Proceeds only if the current entity tag matches this value.
The name of Cognitive Services account's project.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Do not prompt for confirmation.
| Property | Value |
|---|---|
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az cognitiveservices account project costcontrol head
Command group 'az cognitiveservices account project costcontrol' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Checks whether a project-owned cost control exists without returning its body.
az cognitiveservices account project costcontrol head [--account-name]
[--acquire-policy-token]
[--change-reference]
[--cost-control-name --name]
[--ids]
[--project-name]
[--resource-group]
[--subscription]
Examples
Check for a budget without returning its body
az cognitiveservices account project costcontrol head --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The name of Cognitive Services account.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The cost-control name. Names contain 1-63 ASCII letters, numbers, underscores, or hyphens, including a leading underscore or hyphen.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The name of Cognitive Services account's project.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az cognitiveservices account project costcontrol list
Command group 'az cognitiveservices account project costcontrol' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List project-owned cost controls.
az cognitiveservices account project costcontrol list --account-name
--project-name
--resource-group
[--max-items]
[--next-token]
Examples
List budgets owned by a project
az cognitiveservices account project costcontrol list --resource-group foundry-resource-group --account-name foundry-account --project-name production
Required Parameters
The name of Cognitive Services account.
The name of Cognitive Services account's project.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.
| Property | Value |
|---|---|
| Parameter group: | Pagination Arguments |
Token to specify where to start paginating. This is the token value from a previously truncated response.
| Property | Value |
|---|---|
| Parameter group: | Pagination Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az cognitiveservices account project costcontrol show
Command group 'az cognitiveservices account project costcontrol' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get a project-owned cost control and its representation entity tag.
az cognitiveservices account project costcontrol show [--account-name]
[--cost-control-name --name]
[--ids]
[--project-name]
[--resource-group]
[--subscription]
Examples
Get a project-owned budget
az cognitiveservices account project costcontrol show --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The name of Cognitive Services account.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The cost-control name. Names contain 1-63 ASCII letters, numbers, underscores, or hyphens, including a leading underscore or hyphen.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The name of Cognitive Services account's project.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az cognitiveservices account project costcontrol update
Command group 'az cognitiveservices account project costcontrol' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Updates a Foundry project-owned const control.
Updates a Foundry project cost control. Omitting properties preserves all existing cost control properties; setting properties to null or an empty object ({}) clears them all. A non-empty properties object updates selected fields, preserving omitted fields; a successful update that leaves the cost control unchanged retains its entity tag. The complete merged result may contain at most one notification, including disabled notifications, and one Block action. Exceeding either limit returns HTTP 400 without changing the stored definition.
az cognitiveservices account project costcontrol update [--account-name]
[--acquire-policy-token]
[--add]
[--amount]
[--category {Cost, Tokens}]
[--change-reference]
[--cost-control-name --name]
[--filter]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--grouping]
[--ids]
[--if-match]
[--if-none-match]
[--notifications]
[--project-name]
[--provider {Microsoft.CognitiveServices}]
[--provider-properties]
[--remove]
[--resource-group]
[--set]
[--subscription]
[--time-grain {Daily, Monthly, Weekly}]
[--time-period]
Examples
Create or replace a project token budget
az cognitiveservices account project costcontrol update --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget --if-none-match * --category Tokens --amount 1000000 --time-grain Daily --time-period "{start-date:'2026-11-15T00:00:00Z',end-date:'2027-11-15T00:00:00Z'}" --filter "{additionalInfo:{name:tokenType,operator:In,values:[input,output]}}" --notifications "{usageAlert:{eventGridConnectionId:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,thresholdType:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stopRequests:{type:Block,thresholdType:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}"
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The name of Cognitive Services account.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Replaces the positive budget amount, measured in United States dollars for the Cost category or in whole tokens for the Tokens category.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Whether the budget measures estimated cost in United States dollars or token consumption. This category cannot be changed after creation.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
| Accepted values: | Cost, Tokens |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The cost-control name. Names contain 1-63 ASCII letters, numbers, underscores, or hyphens, including a leading underscore or hyphen.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Optional traffic selection. Omission selects all eligible traffic within the owner's scope. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Optional additional partitioning of consumption. Omission or an empty array uses one counter for the owning account or Foundry project. Responses omit owner-default grouping. A project-owned control cannot explicitly group by project. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Proceeds only if the current entity tag matches this value.
Proceeds only if the current entity tag does not match this value. Use * to create only if absent.
Merges notifications by case-insensitive name, preserving existing name casing. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
The name of Cognitive Services account's project.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The resource provider for this budget. Omission selects Microsoft.CognitiveServices; responses return that value.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
| Accepted values: | Microsoft.CognitiveServices |
Optional provider-specific enforcement settings. Omission creates no blocking actions. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The calendar-aligned UTC interval at which consumption counters renew within the validity window.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
| Accepted values: | Daily, Monthly, Weekly |
The finite UTC validity window during which the control applies. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Properties Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |