From 529479912eea71f9ffdd57308d830986cb08c029 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Tue, 17 Nov 2026 21:16:42 -0800 Subject: [PATCH 01/10] Fix typo --- .../cognitiveservices/account/project/costcontrol/_create.md | 4 ++-- .../cognitiveservices/account/project/costcontrol/_update.md | 2 +- .../cognitiveservices/account/project/costcontrol/readme.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Commands/cognitiveservices/account/project/costcontrol/_create.md b/Commands/cognitiveservices/account/project/costcontrol/_create.md index 5d6bfe924..8d5d3683b 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_create.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_create.md @@ -1,8 +1,8 @@ # [Command] _cognitiveservices account project costcontrol create_ -Create a Foundry project-owned const control. +Create a Foundry project-owned cost 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. +Create a Foundry project-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. ## Versions diff --git a/Commands/cognitiveservices/account/project/costcontrol/_update.md b/Commands/cognitiveservices/account/project/costcontrol/_update.md index 826b77ae6..2415af64d 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_update.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_update.md @@ -1,6 +1,6 @@ # [Command] _cognitiveservices account project costcontrol update_ -Updates a Foundry project-owned const control. +Updates a Foundry project-owned cost 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. diff --git a/Commands/cognitiveservices/account/project/costcontrol/readme.md b/Commands/cognitiveservices/account/project/costcontrol/readme.md index 922553d74..0a8ab7341 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/readme.md +++ b/Commands/cognitiveservices/account/project/costcontrol/readme.md @@ -5,7 +5,7 @@ Manage Foundry project-owned cost controls ## Commands - [create](/Commands/cognitiveservices/account/project/costcontrol/_create.md) -: Create a Foundry project-owned const control. +: Create a Foundry project-owned cost control. - [delete](/Commands/cognitiveservices/account/project/costcontrol/_delete.md) : Delete a project-owned cost control. @@ -20,4 +20,4 @@ Manage Foundry project-owned cost controls : Get a project-owned cost control and its representation entity tag. - [update](/Commands/cognitiveservices/account/project/costcontrol/_update.md) -: Updates a Foundry project-owned const control. +: Updates a Foundry project-owned cost control. From 8324936faabd6b6067f1dd925a37161360123727 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Tue, 17 Nov 2026 21:54:32 -0800 Subject: [PATCH 02/10] Better examples --- .../cognitiveservices/account/costcontrol/_create.md | 10 +++++++++- .../account/project/costcontrol/_create.md | 6 +++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Commands/cognitiveservices/account/costcontrol/_create.md b/Commands/cognitiveservices/account/costcontrol/_create.md index 0ba1749d9..9378292d3 100644 --- a/Commands/cognitiveservices/account/costcontrol/_create.md +++ b/Commands/cognitiveservices/account/costcontrol/_create.md @@ -23,7 +23,15 @@ Create an account-owned cost control. The definition may contain at most one not #### examples -- Create or replace an account cost budget +- Cap the whole Foundry resource at $1000 a month and block at 100% + ```bash + cognitiveservices account costcontrol create --resource-group foundry-resource-group --account-name foundry-account --cost-control-name monthly-cap --category Cost --amount 1000 --time-grain Monthly --time-period "{start-date:'2026-12-01T00:00:00Z',end-date:'2027-12-01T00:00:00Z'}" --provider-properties "{actions:{block-at-100:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" + ``` +- Cap at $1000 a month, alert at 80% but do not block + ```bash + cognitiveservices account costcontrol create --resource-group foundry-resource-group --account-name foundry-account --cost-control-name monthly-cap --category Cost --amount 1000 --time-grain Monthly --time-period "{start-date:'2026-12-01T00:00:00Z',end-date:'2027-12-01T00:00:00Z'}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:true,operator:GreaterThanOrEqualTo}}" + ``` +- Example using full settings (filters, grouping, alert and block) ```bash 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}}}" ``` diff --git a/Commands/cognitiveservices/account/project/costcontrol/_create.md b/Commands/cognitiveservices/account/project/costcontrol/_create.md index 8d5d3683b..6335e33b1 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_create.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_create.md @@ -12,7 +12,11 @@ Create a Foundry project-owned cost control. The definition may contain at most #### examples -- Create or replace a project token budget +- Cap at 2M tokens a day, alert when reaching 80% and block at 100% + ```bash + 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 2000000 --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}}}" + ``` +- Example using full settings (filters, alert and block) ```bash 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}}}" ``` From 8fec7024ba050f1cabd5ce1937f736bb72e0b884 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Tue, 17 Nov 2026 22:40:26 -0800 Subject: [PATCH 03/10] Re-export added space lines in examples --- Commands/cognitiveservices/account/costcontrol/_create.md | 2 ++ .../cognitiveservices/account/project/costcontrol/_create.md | 1 + 2 files changed, 3 insertions(+) diff --git a/Commands/cognitiveservices/account/costcontrol/_create.md b/Commands/cognitiveservices/account/costcontrol/_create.md index 9378292d3..d2e897748 100644 --- a/Commands/cognitiveservices/account/costcontrol/_create.md +++ b/Commands/cognitiveservices/account/costcontrol/_create.md @@ -27,10 +27,12 @@ Create an account-owned cost control. The definition may contain at most one not ```bash cognitiveservices account costcontrol create --resource-group foundry-resource-group --account-name foundry-account --cost-control-name monthly-cap --category Cost --amount 1000 --time-grain Monthly --time-period "{start-date:'2026-12-01T00:00:00Z',end-date:'2027-12-01T00:00:00Z'}" --provider-properties "{actions:{block-at-100:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ``` + - Cap at $1000 a month, alert at 80% but do not block ```bash cognitiveservices account costcontrol create --resource-group foundry-resource-group --account-name foundry-account --cost-control-name monthly-cap --category Cost --amount 1000 --time-grain Monthly --time-period "{start-date:'2026-12-01T00:00:00Z',end-date:'2027-12-01T00:00:00Z'}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:true,operator:GreaterThanOrEqualTo}}" ``` + - Example using full settings (filters, grouping, alert and block) ```bash 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}}}" diff --git a/Commands/cognitiveservices/account/project/costcontrol/_create.md b/Commands/cognitiveservices/account/project/costcontrol/_create.md index 6335e33b1..14402c2a5 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_create.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_create.md @@ -16,6 +16,7 @@ Create a Foundry project-owned cost control. The definition may contain at most ```bash 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 2000000 --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}}}" ``` + - Example using full settings (filters, alert and block) ```bash 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}}}" From c4f1f17a080d3965df5b4ed9588a8b9d269657ad Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Tue, 17 Nov 2026 23:00:10 -0800 Subject: [PATCH 04/10] change casing of some examples --- Commands/cognitiveservices/account/costcontrol/_create.md | 2 +- Commands/cognitiveservices/account/costcontrol/_update.md | 2 +- .../cognitiveservices/account/project/costcontrol/_create.md | 2 +- .../cognitiveservices/account/project/costcontrol/_update.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Commands/cognitiveservices/account/costcontrol/_create.md b/Commands/cognitiveservices/account/costcontrol/_create.md index d2e897748..e6821cb64 100644 --- a/Commands/cognitiveservices/account/costcontrol/_create.md +++ b/Commands/cognitiveservices/account/costcontrol/_create.md @@ -35,5 +35,5 @@ Create an account-owned cost control. The definition may contain at most one not - Example using full settings (filters, grouping, alert and block) ```bash - 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}}}" + 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]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ``` diff --git a/Commands/cognitiveservices/account/costcontrol/_update.md b/Commands/cognitiveservices/account/costcontrol/_update.md index d0dc2e880..b6081fe56 100644 --- a/Commands/cognitiveservices/account/costcontrol/_update.md +++ b/Commands/cognitiveservices/account/costcontrol/_update.md @@ -25,5 +25,5 @@ Omitting properties preserves all existing cost control properties; setting prop - Create or replace an account cost budget ```bash - 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}}}" + 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:[{additional-info:{name:project,operator:In,values:[production]}},{additional-info:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ``` diff --git a/Commands/cognitiveservices/account/project/costcontrol/_create.md b/Commands/cognitiveservices/account/project/costcontrol/_create.md index 14402c2a5..f36580ef8 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_create.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_create.md @@ -19,5 +19,5 @@ Create a Foundry project-owned cost control. The definition may contain at most - Example using full settings (filters, alert and block) ```bash - 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}}}" + 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 "{additional-info:{name:tokenType,operator:In,values:[input,output]}}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ``` diff --git a/Commands/cognitiveservices/account/project/costcontrol/_update.md b/Commands/cognitiveservices/account/project/costcontrol/_update.md index 2415af64d..c200ab11b 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_update.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_update.md @@ -14,5 +14,5 @@ Updates a Foundry project cost control. Omitting properties preserves all existi - Create or replace a project token budget ```bash - 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}}}" + 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 "{additional-info:{name:tokenType,operator:In,values:[input,output]}}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,thresholdType:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ``` From ac31472464386dbb30386fdb1d9f1570e0d359d3 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Wed, 18 Nov 2026 11:21:22 -0800 Subject: [PATCH 05/10] Add examples --- .../cognitiveservices/account/costcontrol/_update.md | 9 +++++++-- .../account/project/costcontrol/_update.md | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Commands/cognitiveservices/account/costcontrol/_update.md b/Commands/cognitiveservices/account/costcontrol/_update.md index b6081fe56..66603a185 100644 --- a/Commands/cognitiveservices/account/costcontrol/_update.md +++ b/Commands/cognitiveservices/account/costcontrol/_update.md @@ -23,7 +23,12 @@ Omitting properties preserves all existing cost control properties; setting prop #### examples -- Create or replace an account cost budget +- Update the account's cap to $1500 per the previously set period ```bash - 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:[{additional-info:{name:project,operator:In,values:[production]}},{additional-info:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" + cognitiveservices account costcontrol update ---resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --amount 1500 + ``` + +- Example using full settings (filters, grouping, alert and block) + ```bash + 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:[{additional-info:{name:project,operator:In,values:[production]}},{additional-info:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}} ``` diff --git a/Commands/cognitiveservices/account/project/costcontrol/_update.md b/Commands/cognitiveservices/account/project/costcontrol/_update.md index c200ab11b..5e8d247c8 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_update.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_update.md @@ -12,7 +12,12 @@ Updates a Foundry project cost control. Omitting properties preserves all existi #### examples -- Create or replace a project token budget +- Update alert threshold to 90% + ```bash + cognitiveservices account project costcontrol update --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget --set properties.notifications.usageAlert.threshold=90 + ``` + +- Example using full settings (filters, grouping, alert and block) ```bash 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 "{additional-info:{name:tokenType,operator:In,values:[input,output]}}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,thresholdType:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ``` From 93fa882f4b363c4d6c0484b6877f84b2b996f9b3 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Wed, 18 Nov 2026 11:53:47 -0800 Subject: [PATCH 06/10] Fixes --- Commands/cognitiveservices/account/costcontrol/_update.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Commands/cognitiveservices/account/costcontrol/_update.md b/Commands/cognitiveservices/account/costcontrol/_update.md index 66603a185..99d9c72dd 100644 --- a/Commands/cognitiveservices/account/costcontrol/_update.md +++ b/Commands/cognitiveservices/account/costcontrol/_update.md @@ -25,10 +25,10 @@ Omitting properties preserves all existing cost control properties; setting prop - Update the account's cap to $1500 per the previously set period ```bash - cognitiveservices account costcontrol update ---resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --amount 1500 + cognitiveservices account costcontrol update --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --amount 1500 ``` - Example using full settings (filters, grouping, alert and block) ```bash - 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:[{additional-info:{name:project,operator:In,values:[production]}},{additional-info:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}} + 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:[{additional-info:{name:project,operator:In,values:[production]}},{additional-info:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ``` From 14fd0b7e41f6505d7684f22506bb1988158a6eec Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Wed, 18 Nov 2026 14:10:13 -0800 Subject: [PATCH 07/10] more examples --- .../account/costcontrol/_delete.md | 9 +++++++-- .../account/costcontrol/_update.md | 15 +++++++++++++++ .../account/project/costcontrol/_update.md | 5 +++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/Commands/cognitiveservices/account/costcontrol/_delete.md b/Commands/cognitiveservices/account/costcontrol/_delete.md index 493eb7aa1..7181d7ead 100644 --- a/Commands/cognitiveservices/account/costcontrol/_delete.md +++ b/Commands/cognitiveservices/account/costcontrol/_delete.md @@ -21,7 +21,12 @@ Delete an account-owned cost control. #### examples -- Delete a budget conditionally +- Delete a budget if the account entity tag matches the given one. Note the required forward slash before the quotation marks around the entity tag. ```bash - 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" + cognitiveservices account costcontrol delete --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --if-match \"c6d292d2-521f-4f7f-ab38-1be7e4a56e9e.additional-info\" + ``` + +- Delete a budget + ```bash + cognitiveservices account costcontrol delete --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents ``` diff --git a/Commands/cognitiveservices/account/costcontrol/_update.md b/Commands/cognitiveservices/account/costcontrol/_update.md index 99d9c72dd..2f79bb28f 100644 --- a/Commands/cognitiveservices/account/costcontrol/_update.md +++ b/Commands/cognitiveservices/account/costcontrol/_update.md @@ -32,3 +32,18 @@ Omitting properties preserves all existing cost control properties; setting prop ```bash 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:[{additional-info:{name:project,operator:In,values:[production]}},{additional-info:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ``` + +- Update the account's cap to $1500 per the previously set period, if the account entity tag matches the given one. Note the required forward slash before the quotation marks around the entity tag. + ```bash + cognitiveservices account costcontrol update --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --amount 1500 -if-match \"bb926e0d-880b-4d60-8d59-9a341fa826a2.additional-info\" + ``` + +- Update the account's budget end date + ```bash + cognitiveservices account costcontrol update --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --set properties.timePeriod.endDate="2028-12-01T00:00:00Z" + ``` + +- Update the account's budget notification threshold to 90% + ```bash + cognitiveservices account costcontrol update --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --set properties.notifications.usageAlert.threshold=90 + ``` diff --git a/Commands/cognitiveservices/account/project/costcontrol/_update.md b/Commands/cognitiveservices/account/project/costcontrol/_update.md index 5e8d247c8..f962bb9bb 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_update.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_update.md @@ -21,3 +21,8 @@ Updates a Foundry project cost control. Omitting properties preserves all existi ```bash 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 "{additional-info:{name:tokenType,operator:In,values:[input,output]}}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,thresholdType:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ``` + +- Update alert threshold to 90%, if the project entity tag matches the given one. Note the required forward slash before the quotation marks around the entity tag. + ```bash + cognitiveservices account project costcontrol update --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget --if-match \"bb926e0d-880b-4d60-8d59-9a341fa826a2.additional-info\" --set properties.notifications.usageAlert.threshold=90 + ``` From 8517f3a6676fb18a041091136ed9ca735d9dcf17 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Wed, 18 Nov 2026 14:42:20 -0800 Subject: [PATCH 08/10] Update examples --- .../cognitiveservices/account/costcontrol/_delete.md | 8 ++++---- .../cognitiveservices/account/costcontrol/_update.md | 12 ++++++------ .../account/project/costcontrol/_delete.md | 7 ++++++- .../account/project/costcontrol/_update.md | 8 ++++---- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/Commands/cognitiveservices/account/costcontrol/_delete.md b/Commands/cognitiveservices/account/costcontrol/_delete.md index 7181d7ead..3296b891d 100644 --- a/Commands/cognitiveservices/account/costcontrol/_delete.md +++ b/Commands/cognitiveservices/account/costcontrol/_delete.md @@ -21,12 +21,12 @@ Delete an account-owned cost control. #### examples -- Delete a budget if the account entity tag matches the given one. Note the required forward slash before the quotation marks around the entity tag. +- Delete a budget ```bash - cognitiveservices account costcontrol delete --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --if-match \"c6d292d2-521f-4f7f-ab38-1be7e4a56e9e.additional-info\" + cognitiveservices account costcontrol delete --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents ``` -- Delete a budget +- Delete a budget if the account entity tag matches the given one. Note the required forward slash before the quotation marks around the entity tag. ```bash - cognitiveservices account costcontrol delete --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents + cognitiveservices account costcontrol delete --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --if-match \"c6d292d2-521f-4f7f-ab38-1be7e4a56e9e.additional-info\" ``` diff --git a/Commands/cognitiveservices/account/costcontrol/_update.md b/Commands/cognitiveservices/account/costcontrol/_update.md index 2f79bb28f..7757d88f5 100644 --- a/Commands/cognitiveservices/account/costcontrol/_update.md +++ b/Commands/cognitiveservices/account/costcontrol/_update.md @@ -28,14 +28,9 @@ Omitting properties preserves all existing cost control properties; setting prop cognitiveservices account costcontrol update --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --amount 1500 ``` -- Example using full settings (filters, grouping, alert and block) - ```bash - 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:[{additional-info:{name:project,operator:In,values:[production]}},{additional-info:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" - ``` - - Update the account's cap to $1500 per the previously set period, if the account entity tag matches the given one. Note the required forward slash before the quotation marks around the entity tag. ```bash - cognitiveservices account costcontrol update --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --amount 1500 -if-match \"bb926e0d-880b-4d60-8d59-9a341fa826a2.additional-info\" + cognitiveservices account costcontrol update --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --amount 1500 --if-match \"bb926e0d-880b-4d60-8d59-9a341fa826a2.additional-info\" ``` - Update the account's budget end date @@ -47,3 +42,8 @@ Omitting properties preserves all existing cost control properties; setting prop ```bash cognitiveservices account costcontrol update --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --set properties.notifications.usageAlert.threshold=90 ``` + +- Example using full settings (filters, grouping, alert and block) + ```bash + 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:[{additional-info:{name:project,operator:In,values:[production]}},{additional-info:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" + ``` diff --git a/Commands/cognitiveservices/account/project/costcontrol/_delete.md b/Commands/cognitiveservices/account/project/costcontrol/_delete.md index 060ae45d6..f339ae4fb 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_delete.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_delete.md @@ -10,7 +10,12 @@ Delete a project-owned cost control. #### examples +- Delete a budget + ```bash + cognitiveservices account project costcontrol delete --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget + ``` + - Delete a budget conditionally ```bash - 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" + 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 \"bb926e0d-880b-4d60-8d59-9a341fa826a2.additional-info\" ``` diff --git a/Commands/cognitiveservices/account/project/costcontrol/_update.md b/Commands/cognitiveservices/account/project/costcontrol/_update.md index f962bb9bb..5959fbe62 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_update.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_update.md @@ -17,12 +17,12 @@ Updates a Foundry project cost control. Omitting properties preserves all existi cognitiveservices account project costcontrol update --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget --set properties.notifications.usageAlert.threshold=90 ``` -- Example using full settings (filters, grouping, alert and block) +- Update alert threshold to 90%, if the project entity tag matches the given one. Note the required forward slash before the quotation marks around the entity tag. ```bash - 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 "{additional-info:{name:tokenType,operator:In,values:[input,output]}}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,thresholdType:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" + cognitiveservices account project costcontrol update --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget --if-match \"bb926e0d-880b-4d60-8d59-9a341fa826a2.additional-info\" --set properties.notifications.usageAlert.threshold=90 ``` -- Update alert threshold to 90%, if the project entity tag matches the given one. Note the required forward slash before the quotation marks around the entity tag. +- Example using full settings (filters, alert and block) ```bash - cognitiveservices account project costcontrol update --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget --if-match \"bb926e0d-880b-4d60-8d59-9a341fa826a2.additional-info\" --set properties.notifications.usageAlert.threshold=90 + 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 "{additional-info:{name:tokenType,operator:In,values:[input,output]}}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ``` From 23e9e48f6d36856589a667c5c947804bb1843415 Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Wed, 18 Nov 2026 14:54:42 -0800 Subject: [PATCH 09/10] More --- .../cognitiveservices/account/project/costcontrol/_delete.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commands/cognitiveservices/account/project/costcontrol/_delete.md b/Commands/cognitiveservices/account/project/costcontrol/_delete.md index f339ae4fb..04e2f6092 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_delete.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_delete.md @@ -15,7 +15,7 @@ Delete a project-owned cost control. cognitiveservices account project costcontrol delete --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget ``` -- Delete a budget conditionally +- Delete a budget if the project entity tag matches the given one. Note the required forward slash before the quotation marks around the entity tag. ```bash 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 \"bb926e0d-880b-4d60-8d59-9a341fa826a2.additional-info\" ``` From 102ed63005e5e7e056ade4562890c1b1598cf74c Mon Sep 17 00:00:00 2001 From: Darren Cohen <39422044+dargilco@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:38:17 -0800 Subject: [PATCH 10/10] more --- Commands/cognitiveservices/account/costcontrol/_create.md | 2 +- Commands/cognitiveservices/account/costcontrol/_update.md | 2 +- .../cognitiveservices/account/project/costcontrol/_create.md | 2 +- .../cognitiveservices/account/project/costcontrol/_update.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Commands/cognitiveservices/account/costcontrol/_create.md b/Commands/cognitiveservices/account/costcontrol/_create.md index e6821cb64..3bbc9ebc9 100644 --- a/Commands/cognitiveservices/account/costcontrol/_create.md +++ b/Commands/cognitiveservices/account/costcontrol/_create.md @@ -35,5 +35,5 @@ Create an account-owned cost control. The definition may contain at most one not - Example using full settings (filters, grouping, alert and block) ```bash - 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]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" + 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:[{additional-info:{name:project,operator:In,values:[production]}},{additional-info:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ``` diff --git a/Commands/cognitiveservices/account/costcontrol/_update.md b/Commands/cognitiveservices/account/costcontrol/_update.md index 7757d88f5..92ce52d84 100644 --- a/Commands/cognitiveservices/account/costcontrol/_update.md +++ b/Commands/cognitiveservices/account/costcontrol/_update.md @@ -45,5 +45,5 @@ Omitting properties preserves all existing cost control properties; setting prop - Example using full settings (filters, grouping, alert and block) ```bash - 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:[{additional-info:{name:project,operator:In,values:[production]}},{additional-info:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" + cognitiveservices account costcontrol update --resource-group foundry-resource-group --account-name foundry-account --cost-control-name production-agents --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:[{additional-info:{name:project,operator:In,values:[production]}},{additional-info:{name:agent,operator:In,values:[customer-support,order-assistant]}},{additional-info:{name:deployment,operator:In,values:[customer-support-model]}}]}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ``` diff --git a/Commands/cognitiveservices/account/project/costcontrol/_create.md b/Commands/cognitiveservices/account/project/costcontrol/_create.md index f36580ef8..68dc68cb9 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_create.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_create.md @@ -14,7 +14,7 @@ Create a Foundry project-owned cost control. The definition may contain at most - Cap at 2M tokens a day, alert when reaching 80% and block at 100% ```bash - 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 2000000 --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}}}" + 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 2000000 --time-grain Daily --time-period "{start-date:'2026-11-15T00:00:00Z',end-date:'2027-11-15T00:00:00Z'}" --filter "{additional-info:{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}}}" ``` - Example using full settings (filters, alert and block) diff --git a/Commands/cognitiveservices/account/project/costcontrol/_update.md b/Commands/cognitiveservices/account/project/costcontrol/_update.md index 5959fbe62..f2babb115 100644 --- a/Commands/cognitiveservices/account/project/costcontrol/_update.md +++ b/Commands/cognitiveservices/account/project/costcontrol/_update.md @@ -24,5 +24,5 @@ Updates a Foundry project cost control. Omitting properties preserves all existi - Example using full settings (filters, alert and block) ```bash - 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 "{additional-info:{name:tokenType,operator:In,values:[input,output]}}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" + cognitiveservices account project costcontrol update --resource-group foundry-resource-group --account-name foundry-account --project-name production --cost-control-name project-token-budget --category Tokens --amount 1000000 --time-grain Daily --time-period "{start-date:'2026-11-15T00:00:00Z',end-date:'2027-11-15T00:00:00Z'}" --filter "{additional-info:{name:tokenType,operator:In,values:[input,output]}}" --notifications "{usage-alert:{event-grid-connection-id:/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/foundry-resource-group/providers/Microsoft.CognitiveServices/accounts/foundry-account/connections/budget-alerts,threshold-type:Percentage,threshold:80,enabled:True,operator:GreaterThanOrEqualTo}}" --provider-properties "{actions:{stop-requests:{type:Block,threshold-type:Percentage,threshold:100,operator:GreaterThanOrEqualTo}}}" ```