Skip to content

[Request]: Strong-type support for Approval & Checks variants #24

@msc365admin

Description

@msc365admin

Is there an existing issue for this?

  • I have searched the existing issues

Azure.DevOps.PSModule version

0.2.0-alpha1

Related function

New-AdoCheckApproval, New-AdoCheckBranchControl, etc.

Infra as Code type

Bicep, PowerShell

Use case

As a Azure Platform Engineer managing Azure DevOps governance at scale via Infrastructure-as-Code

I want support for all Azure DevOps Approvals & Checks variants. Each as a distinct, strongly-typed cmdlet, so I can declaratively create, update, read, and remove checks across supported resource types. Specifically, support for:

  • Evaluate artifact (preview)
  • Required template
  • Invoke Azure Function
  • Invoke REST API
  • Query Azure Monitor alerts
  • Exclusive Lock

Like the current pattern for existing cmdlets:

  • Approvals
  • Pre-check approvals
  • Post-check approvals
  • Branch Control
  • Business Hours

So that

  • I can Manage approvals and checks with repeatable, auditable IaC; eliminating manual portal drift.
  • Pipelines, environments, service connections, and repositories have consistent guardrails that are easy to version, review, and enforce across tenants/projects.

Notes

  • Ensure idempotency and support -WhatIf for dry runs.
  • Mark preview features with -AllowPreview and document limitations.
  • Align parameter sets with Azure DevOps REST API schema for consistency.

Proposed solution

Follow the existing cmdlet pattern for checks and approvals:

Cmdlet Naming Convention:

  • New-AdoCheck
  • Get-AdoCheck
  • Set-AdoCheck
  • Remove-AdoCheck

Example Variants and Suggested Cmdlets:

  • New-AdoCheckEvaluateArtifact (Preview)
    • Parameters: -ResourceId, -ArtifactCriteria, -Blocking, -AllowPreview
  • New-AdoCheckRequiredTemplate
    • Parameters: -ResourceId, -TemplateId, -Blocking
  • New-AdoCheckInvokeAzureFunction
    • Parameters: -ResourceId, -FunctionUrl, -Headers, -Timeout, -Blocking
  • New-AdoCheckInvokeRestApi
    • Parameters: -ResourceId, -Endpoint, -Method, -Headers, -Body, -Blocking
  • New-AdoCheckQueryAzureMonitorAlerts
    • Parameters: -ResourceId, -AlertCriteria, -Blocking
  • New-AdoCheckExclusiveLock
    • Parameters: -ResourceId, -LockBehavior, -Blocking

Metadata

Metadata

Assignees

Labels

long term ⌛Will be worked on, but will take a longer amount of time due to complexity or priorities

Projects

Status

Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions