az cognitiveservices account costcontrol

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage Foundry account-owned Cost Controls.

Commands

Name Description Type Status
az cognitiveservices account costcontrol create

Create an account-owned cost control.

Core Preview
az cognitiveservices account costcontrol delete

Delete an account-owned cost control.

Core Preview
az cognitiveservices account costcontrol head

Checks whether an account-owned cost control exists without returning its body.

Core Preview
az cognitiveservices account costcontrol list

List account-owned cost controls.

Core Preview
az cognitiveservices account costcontrol show

Get an account-owned cost control and its representation entity tag.

Core Preview
az cognitiveservices account costcontrol update

Update an account-owned cost control.

Core Preview

az cognitiveservices account costcontrol create

Preview

Command group 'az cognitiveservices account costcontrol' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create an account-owned cost control.

Create an account-owned cost 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 costcontrol create --account-name
                                                --cost-control-name --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 an account cost budget

az cognitiveservices account costcontrol create --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --if-none-match * --grouping "[{name:agent,type:AdditionalInfoKey}]" --category Cost --amount 1000 --time-grain Monthly --time-period "{start-date:'2026-11-15T00:00:00Z',end-date:'2027-11-15T00:00:00Z'}" --filter "{and:[{additionalInfo:{name:project,operator:In,values:[production]}},{additionalInfo:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additionalInfo:{name:deployment,operator:In,values:[customer-support-model]}}]}" --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.

--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 costcontrol delete

Preview

Command group 'az cognitiveservices account costcontrol' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete an account-owned cost control.

az cognitiveservices account costcontrol delete [--account-name]
                                                [--acquire-policy-token]
                                                [--change-reference]
                                                [--cost-control-name --name]
                                                [--ids]
                                                [--if-match]
                                                [--resource-group]
                                                [--subscription]
                                                [--yes]

Examples

Delete a budget conditionally

az cognitiveservices account costcontrol delete --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --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.

--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 costcontrol head

Preview

Command group 'az cognitiveservices account costcontrol' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Checks whether an account-owned cost control exists without returning its body.

az cognitiveservices account costcontrol head [--account-name]
                                              [--acquire-policy-token]
                                              [--change-reference]
                                              [--cost-control-name --name]
                                              [--ids]
                                              [--resource-group]
                                              [--subscription]

Examples

Check for a budget without returning its body

az cognitiveservices account costcontrol head --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents

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
--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 costcontrol list

Preview

Command group 'az cognitiveservices account costcontrol' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List account-owned cost controls.

az cognitiveservices account costcontrol list --account-name
                                              --resource-group
                                              [--max-items]
                                              [--next-token]

Examples

List budgets owned by an account

az cognitiveservices account costcontrol list --resource-group foundry-resource-group --account-name foundry-account

Required Parameters

--account-name

The name of Cognitive Services account.

--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 costcontrol show

Preview

Command group 'az cognitiveservices account costcontrol' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get an account-owned cost control and its representation entity tag.

az cognitiveservices account costcontrol show [--account-name]
                                              [--cost-control-name --name]
                                              [--ids]
                                              [--resource-group]
                                              [--subscription]

Examples

Get an account-owned budget

az cognitiveservices account costcontrol show --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents

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
--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 costcontrol update

Preview

Command group 'az cognitiveservices account costcontrol' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update an account-owned 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 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]
                                                [--provider {Microsoft.CognitiveServices}]
                                                [--provider-properties]
                                                [--remove]
                                                [--resource-group]
                                                [--set]
                                                [--subscription]
                                                [--time-grain {Daily, Monthly, Weekly}]
                                                [--time-period]

Examples

Create or replace an account cost budget

az cognitiveservices account costcontrol update --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --if-none-match * --grouping "[{name:agent,type:AdditionalInfoKey}]" --category Cost --amount 1000 --time-grain Monthly --time-period "{start-date:'2026-11-15T00:00:00Z',end-date:'2027-11-15T00:00:00Z'}" --filter "{and:[{additionalInfo:{name:project,operator:In,values:[production]}},{additionalInfo:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additionalInfo:{name:deployment,operator:In,values:[customer-support-model]}}]}" --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
--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