1. Packages
  2. Azuredevops Provider
  3. API Docs
  4. BranchPolicyStatusCheck
Azure DevOps v3.3.0 published on Wednesday, Sep 4, 2024 by Pulumi

azuredevops.BranchPolicyStatusCheck

Explore with Pulumi AI

azuredevops logo
Azure DevOps v3.3.0 published on Wednesday, Sep 4, 2024 by Pulumi

    Manages a status check branch policy within Azure DevOps.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azuredevops from "@pulumi/azuredevops";
    
    const example = new azuredevops.Project("example", {
        name: "Example Project",
        visibility: "private",
        versionControl: "Git",
        workItemTemplate: "Agile",
        features: {
            testplans: "disabled",
            artifacts: "disabled",
        },
        description: "Managed by Terraform",
    });
    const exampleGit = new azuredevops.Git("example", {
        projectId: example.id,
        name: "Example Repository",
        initialization: {
            initType: "Clean",
        },
    });
    const exampleUser = new azuredevops.User("example", {
        principalName: "mail@email.com",
        accountLicenseType: "basic",
    });
    const exampleBranchPolicyStatusCheck = new azuredevops.BranchPolicyStatusCheck("example", {
        projectId: example.id,
        enabled: true,
        blocking: true,
        settings: {
            name: "Release",
            authorId: exampleUser.id,
            invalidateOnUpdate: true,
            applicability: "conditional",
            displayName: "PreCheck",
            scopes: [
                {
                    repositoryId: exampleGit.id,
                    repositoryRef: exampleGit.defaultBranch,
                    matchType: "Exact",
                },
                {
                    matchType: "DefaultBranch",
                },
            ],
        },
    });
    
    import pulumi
    import pulumi_azuredevops as azuredevops
    
    example = azuredevops.Project("example",
        name="Example Project",
        visibility="private",
        version_control="Git",
        work_item_template="Agile",
        features={
            "testplans": "disabled",
            "artifacts": "disabled",
        },
        description="Managed by Terraform")
    example_git = azuredevops.Git("example",
        project_id=example.id,
        name="Example Repository",
        initialization={
            "init_type": "Clean",
        })
    example_user = azuredevops.User("example",
        principal_name="mail@email.com",
        account_license_type="basic")
    example_branch_policy_status_check = azuredevops.BranchPolicyStatusCheck("example",
        project_id=example.id,
        enabled=True,
        blocking=True,
        settings={
            "name": "Release",
            "author_id": example_user.id,
            "invalidate_on_update": True,
            "applicability": "conditional",
            "display_name": "PreCheck",
            "scopes": [
                {
                    "repository_id": example_git.id,
                    "repository_ref": example_git.default_branch,
                    "match_type": "Exact",
                },
                {
                    "match_type": "DefaultBranch",
                },
            ],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := azuredevops.NewProject(ctx, "example", &azuredevops.ProjectArgs{
    			Name:             pulumi.String("Example Project"),
    			Visibility:       pulumi.String("private"),
    			VersionControl:   pulumi.String("Git"),
    			WorkItemTemplate: pulumi.String("Agile"),
    			Features: pulumi.StringMap{
    				"testplans": pulumi.String("disabled"),
    				"artifacts": pulumi.String("disabled"),
    			},
    			Description: pulumi.String("Managed by Terraform"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleGit, err := azuredevops.NewGit(ctx, "example", &azuredevops.GitArgs{
    			ProjectId: example.ID(),
    			Name:      pulumi.String("Example Repository"),
    			Initialization: &azuredevops.GitInitializationArgs{
    				InitType: pulumi.String("Clean"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleUser, err := azuredevops.NewUser(ctx, "example", &azuredevops.UserArgs{
    			PrincipalName:      pulumi.String("mail@email.com"),
    			AccountLicenseType: pulumi.String("basic"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuredevops.NewBranchPolicyStatusCheck(ctx, "example", &azuredevops.BranchPolicyStatusCheckArgs{
    			ProjectId: example.ID(),
    			Enabled:   pulumi.Bool(true),
    			Blocking:  pulumi.Bool(true),
    			Settings: &azuredevops.BranchPolicyStatusCheckSettingsArgs{
    				Name:               pulumi.String("Release"),
    				AuthorId:           exampleUser.ID(),
    				InvalidateOnUpdate: pulumi.Bool(true),
    				Applicability:      pulumi.String("conditional"),
    				DisplayName:        pulumi.String("PreCheck"),
    				Scopes: azuredevops.BranchPolicyStatusCheckSettingsScopeArray{
    					&azuredevops.BranchPolicyStatusCheckSettingsScopeArgs{
    						RepositoryId:  exampleGit.ID(),
    						RepositoryRef: exampleGit.DefaultBranch,
    						MatchType:     pulumi.String("Exact"),
    					},
    					&azuredevops.BranchPolicyStatusCheckSettingsScopeArgs{
    						MatchType: pulumi.String("DefaultBranch"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureDevOps = Pulumi.AzureDevOps;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AzureDevOps.Project("example", new()
        {
            Name = "Example Project",
            Visibility = "private",
            VersionControl = "Git",
            WorkItemTemplate = "Agile",
            Features = 
            {
                { "testplans", "disabled" },
                { "artifacts", "disabled" },
            },
            Description = "Managed by Terraform",
        });
    
        var exampleGit = new AzureDevOps.Git("example", new()
        {
            ProjectId = example.Id,
            Name = "Example Repository",
            Initialization = new AzureDevOps.Inputs.GitInitializationArgs
            {
                InitType = "Clean",
            },
        });
    
        var exampleUser = new AzureDevOps.User("example", new()
        {
            PrincipalName = "mail@email.com",
            AccountLicenseType = "basic",
        });
    
        var exampleBranchPolicyStatusCheck = new AzureDevOps.BranchPolicyStatusCheck("example", new()
        {
            ProjectId = example.Id,
            Enabled = true,
            Blocking = true,
            Settings = new AzureDevOps.Inputs.BranchPolicyStatusCheckSettingsArgs
            {
                Name = "Release",
                AuthorId = exampleUser.Id,
                InvalidateOnUpdate = true,
                Applicability = "conditional",
                DisplayName = "PreCheck",
                Scopes = new[]
                {
                    new AzureDevOps.Inputs.BranchPolicyStatusCheckSettingsScopeArgs
                    {
                        RepositoryId = exampleGit.Id,
                        RepositoryRef = exampleGit.DefaultBranch,
                        MatchType = "Exact",
                    },
                    new AzureDevOps.Inputs.BranchPolicyStatusCheckSettingsScopeArgs
                    {
                        MatchType = "DefaultBranch",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuredevops.Project;
    import com.pulumi.azuredevops.ProjectArgs;
    import com.pulumi.azuredevops.Git;
    import com.pulumi.azuredevops.GitArgs;
    import com.pulumi.azuredevops.inputs.GitInitializationArgs;
    import com.pulumi.azuredevops.User;
    import com.pulumi.azuredevops.UserArgs;
    import com.pulumi.azuredevops.BranchPolicyStatusCheck;
    import com.pulumi.azuredevops.BranchPolicyStatusCheckArgs;
    import com.pulumi.azuredevops.inputs.BranchPolicyStatusCheckSettingsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Project("example", ProjectArgs.builder()
                .name("Example Project")
                .visibility("private")
                .versionControl("Git")
                .workItemTemplate("Agile")
                .features(Map.ofEntries(
                    Map.entry("testplans", "disabled"),
                    Map.entry("artifacts", "disabled")
                ))
                .description("Managed by Terraform")
                .build());
    
            var exampleGit = new Git("exampleGit", GitArgs.builder()
                .projectId(example.id())
                .name("Example Repository")
                .initialization(GitInitializationArgs.builder()
                    .initType("Clean")
                    .build())
                .build());
    
            var exampleUser = new User("exampleUser", UserArgs.builder()
                .principalName("mail@email.com")
                .accountLicenseType("basic")
                .build());
    
            var exampleBranchPolicyStatusCheck = new BranchPolicyStatusCheck("exampleBranchPolicyStatusCheck", BranchPolicyStatusCheckArgs.builder()
                .projectId(example.id())
                .enabled(true)
                .blocking(true)
                .settings(BranchPolicyStatusCheckSettingsArgs.builder()
                    .name("Release")
                    .authorId(exampleUser.id())
                    .invalidateOnUpdate(true)
                    .applicability("conditional")
                    .displayName("PreCheck")
                    .scopes(                
                        BranchPolicyStatusCheckSettingsScopeArgs.builder()
                            .repositoryId(exampleGit.id())
                            .repositoryRef(exampleGit.defaultBranch())
                            .matchType("Exact")
                            .build(),
                        BranchPolicyStatusCheckSettingsScopeArgs.builder()
                            .matchType("DefaultBranch")
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azuredevops:Project
        properties:
          name: Example Project
          visibility: private
          versionControl: Git
          workItemTemplate: Agile
          features:
            testplans: disabled
            artifacts: disabled
          description: Managed by Terraform
      exampleGit:
        type: azuredevops:Git
        name: example
        properties:
          projectId: ${example.id}
          name: Example Repository
          initialization:
            initType: Clean
      exampleUser:
        type: azuredevops:User
        name: example
        properties:
          principalName: mail@email.com
          accountLicenseType: basic
      exampleBranchPolicyStatusCheck:
        type: azuredevops:BranchPolicyStatusCheck
        name: example
        properties:
          projectId: ${example.id}
          enabled: true
          blocking: true
          settings:
            name: Release
            authorId: ${exampleUser.id}
            invalidateOnUpdate: true
            applicability: conditional
            displayName: PreCheck
            scopes:
              - repositoryId: ${exampleGit.id}
                repositoryRef: ${exampleGit.defaultBranch}
                matchType: Exact
              - matchType: DefaultBranch
    

    Create BranchPolicyStatusCheck Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BranchPolicyStatusCheck(name: string, args: BranchPolicyStatusCheckArgs, opts?: CustomResourceOptions);
    @overload
    def BranchPolicyStatusCheck(resource_name: str,
                                args: BranchPolicyStatusCheckArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def BranchPolicyStatusCheck(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                project_id: Optional[str] = None,
                                settings: Optional[BranchPolicyStatusCheckSettingsArgs] = None,
                                blocking: Optional[bool] = None,
                                enabled: Optional[bool] = None)
    func NewBranchPolicyStatusCheck(ctx *Context, name string, args BranchPolicyStatusCheckArgs, opts ...ResourceOption) (*BranchPolicyStatusCheck, error)
    public BranchPolicyStatusCheck(string name, BranchPolicyStatusCheckArgs args, CustomResourceOptions? opts = null)
    public BranchPolicyStatusCheck(String name, BranchPolicyStatusCheckArgs args)
    public BranchPolicyStatusCheck(String name, BranchPolicyStatusCheckArgs args, CustomResourceOptions options)
    
    type: azuredevops:BranchPolicyStatusCheck
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BranchPolicyStatusCheckArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BranchPolicyStatusCheckArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BranchPolicyStatusCheckArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BranchPolicyStatusCheckArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BranchPolicyStatusCheckArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var branchPolicyStatusCheckResource = new AzureDevOps.BranchPolicyStatusCheck("branchPolicyStatusCheckResource", new()
    {
        ProjectId = "string",
        Settings = new AzureDevOps.Inputs.BranchPolicyStatusCheckSettingsArgs
        {
            Name = "string",
            Scopes = new[]
            {
                new AzureDevOps.Inputs.BranchPolicyStatusCheckSettingsScopeArgs
                {
                    MatchType = "string",
                    RepositoryId = "string",
                    RepositoryRef = "string",
                },
            },
            Applicability = "string",
            AuthorId = "string",
            DisplayName = "string",
            FilenamePatterns = new[]
            {
                "string",
            },
            Genre = "string",
            InvalidateOnUpdate = false,
        },
        Blocking = false,
        Enabled = false,
    });
    
    example, err := azuredevops.NewBranchPolicyStatusCheck(ctx, "branchPolicyStatusCheckResource", &azuredevops.BranchPolicyStatusCheckArgs{
    	ProjectId: pulumi.String("string"),
    	Settings: &azuredevops.BranchPolicyStatusCheckSettingsArgs{
    		Name: pulumi.String("string"),
    		Scopes: azuredevops.BranchPolicyStatusCheckSettingsScopeArray{
    			&azuredevops.BranchPolicyStatusCheckSettingsScopeArgs{
    				MatchType:     pulumi.String("string"),
    				RepositoryId:  pulumi.String("string"),
    				RepositoryRef: pulumi.String("string"),
    			},
    		},
    		Applicability: pulumi.String("string"),
    		AuthorId:      pulumi.String("string"),
    		DisplayName:   pulumi.String("string"),
    		FilenamePatterns: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Genre:              pulumi.String("string"),
    		InvalidateOnUpdate: pulumi.Bool(false),
    	},
    	Blocking: pulumi.Bool(false),
    	Enabled:  pulumi.Bool(false),
    })
    
    var branchPolicyStatusCheckResource = new BranchPolicyStatusCheck("branchPolicyStatusCheckResource", BranchPolicyStatusCheckArgs.builder()
        .projectId("string")
        .settings(BranchPolicyStatusCheckSettingsArgs.builder()
            .name("string")
            .scopes(BranchPolicyStatusCheckSettingsScopeArgs.builder()
                .matchType("string")
                .repositoryId("string")
                .repositoryRef("string")
                .build())
            .applicability("string")
            .authorId("string")
            .displayName("string")
            .filenamePatterns("string")
            .genre("string")
            .invalidateOnUpdate(false)
            .build())
        .blocking(false)
        .enabled(false)
        .build());
    
    branch_policy_status_check_resource = azuredevops.BranchPolicyStatusCheck("branchPolicyStatusCheckResource",
        project_id="string",
        settings={
            "name": "string",
            "scopes": [{
                "matchType": "string",
                "repositoryId": "string",
                "repositoryRef": "string",
            }],
            "applicability": "string",
            "authorId": "string",
            "displayName": "string",
            "filenamePatterns": ["string"],
            "genre": "string",
            "invalidateOnUpdate": False,
        },
        blocking=False,
        enabled=False)
    
    const branchPolicyStatusCheckResource = new azuredevops.BranchPolicyStatusCheck("branchPolicyStatusCheckResource", {
        projectId: "string",
        settings: {
            name: "string",
            scopes: [{
                matchType: "string",
                repositoryId: "string",
                repositoryRef: "string",
            }],
            applicability: "string",
            authorId: "string",
            displayName: "string",
            filenamePatterns: ["string"],
            genre: "string",
            invalidateOnUpdate: false,
        },
        blocking: false,
        enabled: false,
    });
    
    type: azuredevops:BranchPolicyStatusCheck
    properties:
        blocking: false
        enabled: false
        projectId: string
        settings:
            applicability: string
            authorId: string
            displayName: string
            filenamePatterns:
                - string
            genre: string
            invalidateOnUpdate: false
            name: string
            scopes:
                - matchType: string
                  repositoryId: string
                  repositoryRef: string
    

    BranchPolicyStatusCheck Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The BranchPolicyStatusCheck resource accepts the following input properties:

    ProjectId string
    The ID of the project in which the policy will be created.
    Settings Pulumi.AzureDevOps.Inputs.BranchPolicyStatusCheckSettings
    Configuration for the policy. This block must be defined exactly once.
    Blocking bool
    A flag indicating if the policy should be blocking. Defaults to true.
    Enabled bool
    A flag indicating if the policy should be enabled. Defaults to true.
    ProjectId string
    The ID of the project in which the policy will be created.
    Settings BranchPolicyStatusCheckSettingsArgs
    Configuration for the policy. This block must be defined exactly once.
    Blocking bool
    A flag indicating if the policy should be blocking. Defaults to true.
    Enabled bool
    A flag indicating if the policy should be enabled. Defaults to true.
    projectId String
    The ID of the project in which the policy will be created.
    settings BranchPolicyStatusCheckSettings
    Configuration for the policy. This block must be defined exactly once.
    blocking Boolean
    A flag indicating if the policy should be blocking. Defaults to true.
    enabled Boolean
    A flag indicating if the policy should be enabled. Defaults to true.
    projectId string
    The ID of the project in which the policy will be created.
    settings BranchPolicyStatusCheckSettings
    Configuration for the policy. This block must be defined exactly once.
    blocking boolean
    A flag indicating if the policy should be blocking. Defaults to true.
    enabled boolean
    A flag indicating if the policy should be enabled. Defaults to true.
    project_id str
    The ID of the project in which the policy will be created.
    settings BranchPolicyStatusCheckSettingsArgs
    Configuration for the policy. This block must be defined exactly once.
    blocking bool
    A flag indicating if the policy should be blocking. Defaults to true.
    enabled bool
    A flag indicating if the policy should be enabled. Defaults to true.
    projectId String
    The ID of the project in which the policy will be created.
    settings Property Map
    Configuration for the policy. This block must be defined exactly once.
    blocking Boolean
    A flag indicating if the policy should be blocking. Defaults to true.
    enabled Boolean
    A flag indicating if the policy should be enabled. Defaults to true.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BranchPolicyStatusCheck resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BranchPolicyStatusCheck Resource

    Get an existing BranchPolicyStatusCheck resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: BranchPolicyStatusCheckState, opts?: CustomResourceOptions): BranchPolicyStatusCheck
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            blocking: Optional[bool] = None,
            enabled: Optional[bool] = None,
            project_id: Optional[str] = None,
            settings: Optional[BranchPolicyStatusCheckSettingsArgs] = None) -> BranchPolicyStatusCheck
    func GetBranchPolicyStatusCheck(ctx *Context, name string, id IDInput, state *BranchPolicyStatusCheckState, opts ...ResourceOption) (*BranchPolicyStatusCheck, error)
    public static BranchPolicyStatusCheck Get(string name, Input<string> id, BranchPolicyStatusCheckState? state, CustomResourceOptions? opts = null)
    public static BranchPolicyStatusCheck get(String name, Output<String> id, BranchPolicyStatusCheckState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Blocking bool
    A flag indicating if the policy should be blocking. Defaults to true.
    Enabled bool
    A flag indicating if the policy should be enabled. Defaults to true.
    ProjectId string
    The ID of the project in which the policy will be created.
    Settings Pulumi.AzureDevOps.Inputs.BranchPolicyStatusCheckSettings
    Configuration for the policy. This block must be defined exactly once.
    Blocking bool
    A flag indicating if the policy should be blocking. Defaults to true.
    Enabled bool
    A flag indicating if the policy should be enabled. Defaults to true.
    ProjectId string
    The ID of the project in which the policy will be created.
    Settings BranchPolicyStatusCheckSettingsArgs
    Configuration for the policy. This block must be defined exactly once.
    blocking Boolean
    A flag indicating if the policy should be blocking. Defaults to true.
    enabled Boolean
    A flag indicating if the policy should be enabled. Defaults to true.
    projectId String
    The ID of the project in which the policy will be created.
    settings BranchPolicyStatusCheckSettings
    Configuration for the policy. This block must be defined exactly once.
    blocking boolean
    A flag indicating if the policy should be blocking. Defaults to true.
    enabled boolean
    A flag indicating if the policy should be enabled. Defaults to true.
    projectId string
    The ID of the project in which the policy will be created.
    settings BranchPolicyStatusCheckSettings
    Configuration for the policy. This block must be defined exactly once.
    blocking bool
    A flag indicating if the policy should be blocking. Defaults to true.
    enabled bool
    A flag indicating if the policy should be enabled. Defaults to true.
    project_id str
    The ID of the project in which the policy will be created.
    settings BranchPolicyStatusCheckSettingsArgs
    Configuration for the policy. This block must be defined exactly once.
    blocking Boolean
    A flag indicating if the policy should be blocking. Defaults to true.
    enabled Boolean
    A flag indicating if the policy should be enabled. Defaults to true.
    projectId String
    The ID of the project in which the policy will be created.
    settings Property Map
    Configuration for the policy. This block must be defined exactly once.

    Supporting Types

    BranchPolicyStatusCheckSettings, BranchPolicyStatusCheckSettingsArgs

    Name string
    The status name to check.
    Scopes List<Pulumi.AzureDevOps.Inputs.BranchPolicyStatusCheckSettingsScope>
    Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
    Applicability string
    Policy applicability. If policy applicability is default, apply unless "Not Applicable" status is posted to the pull request. If policy applicability is conditional, policy is applied only after a status is posted to the pull request.
    AuthorId string
    The authorized user can post the status.
    DisplayName string
    The display name.
    FilenamePatterns List<string>
    If a path filter is set, the policy will only apply when files which match the filter are changes. Not setting this field means that the policy will always apply. You can specify absolute paths and wildcards. Example: ["/WebApp/Models/Data.cs", "/WebApp/*", "*.cs"]. Paths prefixed with "!" are excluded. Example: ["/WebApp/*", "!/WebApp/Tests/*"]. Order is significant.
    Genre string
    The genre of the status to check (see Microsoft Documentation)
    InvalidateOnUpdate bool
    Reset status whenever there are new changes.
    Name string
    The status name to check.
    Scopes []BranchPolicyStatusCheckSettingsScope
    Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
    Applicability string
    Policy applicability. If policy applicability is default, apply unless "Not Applicable" status is posted to the pull request. If policy applicability is conditional, policy is applied only after a status is posted to the pull request.
    AuthorId string
    The authorized user can post the status.
    DisplayName string
    The display name.
    FilenamePatterns []string
    If a path filter is set, the policy will only apply when files which match the filter are changes. Not setting this field means that the policy will always apply. You can specify absolute paths and wildcards. Example: ["/WebApp/Models/Data.cs", "/WebApp/*", "*.cs"]. Paths prefixed with "!" are excluded. Example: ["/WebApp/*", "!/WebApp/Tests/*"]. Order is significant.
    Genre string
    The genre of the status to check (see Microsoft Documentation)
    InvalidateOnUpdate bool
    Reset status whenever there are new changes.
    name String
    The status name to check.
    scopes List<BranchPolicyStatusCheckSettingsScope>
    Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
    applicability String
    Policy applicability. If policy applicability is default, apply unless "Not Applicable" status is posted to the pull request. If policy applicability is conditional, policy is applied only after a status is posted to the pull request.
    authorId String
    The authorized user can post the status.
    displayName String
    The display name.
    filenamePatterns List<String>
    If a path filter is set, the policy will only apply when files which match the filter are changes. Not setting this field means that the policy will always apply. You can specify absolute paths and wildcards. Example: ["/WebApp/Models/Data.cs", "/WebApp/*", "*.cs"]. Paths prefixed with "!" are excluded. Example: ["/WebApp/*", "!/WebApp/Tests/*"]. Order is significant.
    genre String
    The genre of the status to check (see Microsoft Documentation)
    invalidateOnUpdate Boolean
    Reset status whenever there are new changes.
    name string
    The status name to check.
    scopes BranchPolicyStatusCheckSettingsScope[]
    Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
    applicability string
    Policy applicability. If policy applicability is default, apply unless "Not Applicable" status is posted to the pull request. If policy applicability is conditional, policy is applied only after a status is posted to the pull request.
    authorId string
    The authorized user can post the status.
    displayName string
    The display name.
    filenamePatterns string[]
    If a path filter is set, the policy will only apply when files which match the filter are changes. Not setting this field means that the policy will always apply. You can specify absolute paths and wildcards. Example: ["/WebApp/Models/Data.cs", "/WebApp/*", "*.cs"]. Paths prefixed with "!" are excluded. Example: ["/WebApp/*", "!/WebApp/Tests/*"]. Order is significant.
    genre string
    The genre of the status to check (see Microsoft Documentation)
    invalidateOnUpdate boolean
    Reset status whenever there are new changes.
    name str
    The status name to check.
    scopes Sequence[BranchPolicyStatusCheckSettingsScope]
    Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
    applicability str
    Policy applicability. If policy applicability is default, apply unless "Not Applicable" status is posted to the pull request. If policy applicability is conditional, policy is applied only after a status is posted to the pull request.
    author_id str
    The authorized user can post the status.
    display_name str
    The display name.
    filename_patterns Sequence[str]
    If a path filter is set, the policy will only apply when files which match the filter are changes. Not setting this field means that the policy will always apply. You can specify absolute paths and wildcards. Example: ["/WebApp/Models/Data.cs", "/WebApp/*", "*.cs"]. Paths prefixed with "!" are excluded. Example: ["/WebApp/*", "!/WebApp/Tests/*"]. Order is significant.
    genre str
    The genre of the status to check (see Microsoft Documentation)
    invalidate_on_update bool
    Reset status whenever there are new changes.
    name String
    The status name to check.
    scopes List<Property Map>
    Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
    applicability String
    Policy applicability. If policy applicability is default, apply unless "Not Applicable" status is posted to the pull request. If policy applicability is conditional, policy is applied only after a status is posted to the pull request.
    authorId String
    The authorized user can post the status.
    displayName String
    The display name.
    filenamePatterns List<String>
    If a path filter is set, the policy will only apply when files which match the filter are changes. Not setting this field means that the policy will always apply. You can specify absolute paths and wildcards. Example: ["/WebApp/Models/Data.cs", "/WebApp/*", "*.cs"]. Paths prefixed with "!" are excluded. Example: ["/WebApp/*", "!/WebApp/Tests/*"]. Order is significant.
    genre String
    The genre of the status to check (see Microsoft Documentation)
    invalidateOnUpdate Boolean
    Reset status whenever there are new changes.

    BranchPolicyStatusCheckSettingsScope, BranchPolicyStatusCheckSettingsScopeArgs

    MatchType string
    The match type to use when applying the policy. Supported values are Exact (default), Prefix or DefaultBranch.
    RepositoryId string
    The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_type is DefaultBranch, this should not be defined.
    RepositoryRef string
    The ref pattern to use for the match when match_type other than DefaultBranch. If match_type is Exact, this should be a qualified ref such as refs/heads/master. If match_type is Prefix, this should be a ref path such as refs/heads/releases.
    MatchType string
    The match type to use when applying the policy. Supported values are Exact (default), Prefix or DefaultBranch.
    RepositoryId string
    The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_type is DefaultBranch, this should not be defined.
    RepositoryRef string
    The ref pattern to use for the match when match_type other than DefaultBranch. If match_type is Exact, this should be a qualified ref such as refs/heads/master. If match_type is Prefix, this should be a ref path such as refs/heads/releases.
    matchType String
    The match type to use when applying the policy. Supported values are Exact (default), Prefix or DefaultBranch.
    repositoryId String
    The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_type is DefaultBranch, this should not be defined.
    repositoryRef String
    The ref pattern to use for the match when match_type other than DefaultBranch. If match_type is Exact, this should be a qualified ref such as refs/heads/master. If match_type is Prefix, this should be a ref path such as refs/heads/releases.
    matchType string
    The match type to use when applying the policy. Supported values are Exact (default), Prefix or DefaultBranch.
    repositoryId string
    The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_type is DefaultBranch, this should not be defined.
    repositoryRef string
    The ref pattern to use for the match when match_type other than DefaultBranch. If match_type is Exact, this should be a qualified ref such as refs/heads/master. If match_type is Prefix, this should be a ref path such as refs/heads/releases.
    match_type str
    The match type to use when applying the policy. Supported values are Exact (default), Prefix or DefaultBranch.
    repository_id str
    The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_type is DefaultBranch, this should not be defined.
    repository_ref str
    The ref pattern to use for the match when match_type other than DefaultBranch. If match_type is Exact, this should be a qualified ref such as refs/heads/master. If match_type is Prefix, this should be a ref path such as refs/heads/releases.
    matchType String
    The match type to use when applying the policy. Supported values are Exact (default), Prefix or DefaultBranch.
    repositoryId String
    The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_type is DefaultBranch, this should not be defined.
    repositoryRef String
    The ref pattern to use for the match when match_type other than DefaultBranch. If match_type is Exact, this should be a qualified ref such as refs/heads/master. If match_type is Prefix, this should be a ref path such as refs/heads/releases.

    Import

    Azure DevOps Branch Policies can be imported using the project ID and policy configuration ID:

    $ pulumi import azuredevops:index/branchPolicyStatusCheck:BranchPolicyStatusCheck example 00000000-0000-0000-0000-000000000000/0
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure DevOps pulumi/pulumi-azuredevops
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuredevops Terraform Provider.
    azuredevops logo
    Azure DevOps v3.3.0 published on Wednesday, Sep 4, 2024 by Pulumi