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

Preview

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

--account-name

The name of Cognitive Services account.

--cost-control-name --name -n

The cost-control name. Names contain 1-63 ASCII letters, numbers, underscores, or hyphens, including a leading underscore or hyphen.

--project-name

The name of Cognitive Services account's project.

--resource-group -g

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.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--amount

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
--category

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
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--filter

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
--grouping

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
--if-match

Proceeds only if the current entity tag matches this value.

--if-none-match

Proceeds only if the current entity tag does not match this value. Use * to create only if absent.

--notifications

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
--provider

The resource provider for this budget. Omission selects Microsoft.CognitiveServices; responses return that value.

Property Value
Parameter group: Properties Arguments
Accepted values: Microsoft.CognitiveServices
--provider-properties

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
--time-grain

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
--time-period

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
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az cognitiveservices account project costcontrol delete

Preview

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.

--account-name

The name of Cognitive Services account.

Property Value
Parameter group: Resource Id Arguments
--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--cost-control-name --name -n

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
--ids

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
--if-match

Proceeds only if the current entity tag matches this value.

--project-name

The name of Cognitive Services account's project.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az cognitiveservices account project costcontrol head

Preview

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.

--account-name

The name of Cognitive Services account.

Property Value
Parameter group: Resource Id Arguments
--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--cost-control-name --name -n

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
--ids

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
--project-name

The name of Cognitive Services account's project.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az cognitiveservices account project costcontrol list

Preview

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

--account-name

The name of Cognitive Services account.

--project-name

The name of Cognitive Services account's project.

--resource-group -g

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.

--max-items

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
--next-token

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
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az cognitiveservices account project costcontrol show

Preview

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.

--account-name

The name of Cognitive Services account.

Property Value
Parameter group: Resource Id Arguments
--cost-control-name --name -n

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
--ids

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
--project-name

The name of Cognitive Services account's project.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

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
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az cognitiveservices account project costcontrol update

Preview

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.

--account-name

The name of Cognitive Services account.

Property Value
Parameter group: Resource Id Arguments
--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--add

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
--amount

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
--category

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
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--cost-control-name --name -n

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
--filter

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
--force-string

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
--grouping

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
--ids

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
--if-match

Proceeds only if the current entity tag matches this value.

--if-none-match

Proceeds only if the current entity tag does not match this value. Use * to create only if absent.

--notifications

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
--project-name

The name of Cognitive Services account's project.

Property Value
Parameter group: Resource Id Arguments
--provider

The resource provider for this budget. Omission selects Microsoft.CognitiveServices; responses return that value.

Property Value
Parameter group: Properties Arguments
Accepted values: Microsoft.CognitiveServices
--provider-properties

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

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
--subscription

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
--time-grain

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
--time-period

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
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False