AzureDevOpsDscNative.AzDoBranchPolicy.dsc.adaptedResource.json
|
{
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/adaptedresource/manifest.json", "type": "AzureDevOpsDscNative/AzDoBranchPolicy", "kind": "resource", "version": "1.2.0", "capabilities": [ "set", "test", "get" ], "description": "DSC resource for managing Azure DevOps branch policies.", "author": "ZanattaMichael", "requireAdapter": "Microsoft.Adapter/PowerShell", "path": "AzureDevOpsDscNative.psd1", "schema": { "embedded": { "additionalProperties": false, "title": "AzureDevOpsDscNative/AzDoBranchPolicy", "properties": { "Ensure": { "type": "string", "enum": [ "Present", "Absent" ], "title": "Ensure", "description": "The Ensure property." }, "LookupResult": { "type": "object", "title": "LookupResult", "readOnly": true, "description": "The LookupResult property." }, "ProjectName": { "type": "string", "title": "ProjectName", "description": "The Azure DevOps project name." }, "RepositoryName": { "type": "string", "title": "RepositoryName", "description": "The Git repository name. Leave empty for a cross-repository policy scope that applies to every repository in the project." }, "BranchName": { "type": "string", "title": "BranchName", "description": "The branch ref name (with or without the 'refs/heads/' prefix), or a branch-name prefix when MatchKind is 'Prefix' (e.g. 'release/' matches every 'release/*' branch). Leave empty for a repository-wide policy scope with no branch restriction - only meaningful for policy types that do not require a ref, such as the repository settings policies (file size restriction, path length restriction, reserved names restriction, file name restriction, commit author email validation)." }, "PolicyType": { "type": "string", "title": "PolicyType", "description": "The policy type display name (e.g. 'MinimumReviewerCount')." }, "PolicyIdentifier": { "type": "string", "title": "PolicyIdentifier", "description": "Optional. Azure DevOps allows several policies of the same PolicyType in the same scope (two build validation policies pointing at different pipelines, several status checks, a required-reviewers policy per path filter) but this resource has exactly one Key property (ProjectName), so a second discriminator is needed to give each one a stable identity. Set this to a value that appears among that policy's PolicySettings - a buildDefinitionId, a status check's name, a required reviewer's display name - and it is used, together with PolicyType and the scope, to tell the policies apart. Leaving it unset behaves exactly as before this property existed: the first policy of that type found in the scope is used, so a single-policy-per-type configuration needs no change." }, "MatchKind": { "type": "string", "enum": [ "Exact", "Prefix" ], "title": "MatchKind", "description": "Optional. 'Exact' (default) matches BranchName as one branch. 'Prefix' matches every branch whose ref name starts with BranchName." }, "isEnabled": { "type": "boolean", "title": "isEnabled", "description": "Whether the policy is enabled. Default is $true." }, "isBlocking": { "type": "boolean", "title": "isBlocking", "description": "Whether the policy is blocking. Default is $true." }, "PolicySettings": { "type": "object", "title": "PolicySettings", "description": "Policy-type-specific settings hashtable. Only the keys present here are compared against the live policy's settings when checking for drift - a key the configuration does not state is left alone, never read as \"must be empty\". A 'scope' key, if supplied, overrides the scope this resource would otherwise build from RepositoryName/BranchName/MatchKind." } }, "required": [ "ProjectName", "PolicyType" ], "type": "object", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "DSC resource for managing Azure DevOps branch policies." } } } |