policy

package
v2.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchPolicyBuildValidation deprecated

type BranchPolicyBuildValidation struct {
	pulumi.CustomResourceState

	// A flag indicating if the policy should be blocking. Defaults to `true`.
	Blocking pulumi.BoolPtrOutput `pulumi:"blocking"`
	// A flag indicating if the policy should be enabled. Defaults to `true`.
	Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
	// The ID of the project in which the policy will be created.
	ProjectId pulumi.StringOutput `pulumi:"projectId"`
	// Configuration for the policy. This block must be defined exactly once.
	Settings BranchPolicyBuildValidationSettingsOutput `pulumi:"settings"`
}

Manages a build validation branch policy within Azure DevOps.

## Example Usage

<!--Start PulumiCodeChooser --> ```go package main

import (

"github.com/pulumi/pulumi-azuredevops/sdk/v2/go/azuredevops"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleProject, err := azuredevops.NewProject(ctx, "exampleProject", nil)
		if err != nil {
			return err
		}
		exampleGit, err := azuredevops.NewGit(ctx, "exampleGit", &azuredevops.GitArgs{
			ProjectId: exampleProject.ID(),
			Initialization: &azuredevops.GitInitializationArgs{
				InitType: pulumi.String("Clean"),
			},
		})
		if err != nil {
			return err
		}
		exampleBuildDefinition, err := azuredevops.NewBuildDefinition(ctx, "exampleBuildDefinition", &azuredevops.BuildDefinitionArgs{
			ProjectId: exampleProject.ID(),
			Repository: &azuredevops.BuildDefinitionRepositoryArgs{
				RepoType: pulumi.String("TfsGit"),
				RepoId:   exampleGit.ID(),
				YmlPath:  pulumi.String("azure-pipelines.yml"),
			},
		})
		if err != nil {
			return err
		}
		_, err = azuredevops.NewBranchPolicyBuildValidation(ctx, "exampleBranchPolicyBuildValidation", &azuredevops.BranchPolicyBuildValidationArgs{
			ProjectId: exampleProject.ID(),
			Enabled:   pulumi.Bool(true),
			Blocking:  pulumi.Bool(true),
			Settings: &azuredevops.BranchPolicyBuildValidationSettingsArgs{
				DisplayName:       pulumi.String("Example build validation policy"),
				BuildDefinitionId: exampleBuildDefinition.ID(),
				ValidDuration:     pulumi.Int(720),
				FilenamePatterns: pulumi.StringArray{
					pulumi.String("/WebApp/*"),
					pulumi.String("!/WebApp/Tests/*"),
					pulumi.String("*.cs"),
				},
				Scopes: azuredevops.BranchPolicyBuildValidationSettingsScopeArray{
					&azuredevops.BranchPolicyBuildValidationSettingsScopeArgs{
						RepositoryId:  exampleGit.ID(),
						RepositoryRef: exampleGit.DefaultBranch,
						MatchType:     pulumi.String("Exact"),
					},
					&azuredevops.BranchPolicyBuildValidationSettingsScopeArgs{
						RepositoryId:  exampleGit.ID(),
						RepositoryRef: pulumi.String("refs/heads/releases"),
						MatchType:     pulumi.String("Prefix"),
					},
					&azuredevops.BranchPolicyBuildValidationSettingsScopeArgs{
						MatchType: pulumi.String("DefaultBranch"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` <!--End PulumiCodeChooser -->

## Relevant Links

- [Azure DevOps Service REST API 7.0 - Policy Configurations](https://docs.microsoft.com/en-us/rest/api/azure/devops/policy/configurations/create?view=azure-devops-rest-7.0)

## Import

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

```sh $ pulumi import azuredevops:Policy/branchPolicyBuildValidation:BranchPolicyBuildValidation example 00000000-0000-0000-0000-000000000000/0 ```

Deprecated: azuredevops.policy/branchpolicybuildvalidation.BranchPolicyBuildValidation has been deprecated in favor of azuredevops.index/branchpolicybuildvalidation.BranchPolicyBuildValidation

func GetBranchPolicyBuildValidation

func GetBranchPolicyBuildValidation(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *BranchPolicyBuildValidationState, opts ...pulumi.ResourceOption) (*BranchPolicyBuildValidation, error)

GetBranchPolicyBuildValidation gets an existing BranchPolicyBuildValidation resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewBranchPolicyBuildValidation

func NewBranchPolicyBuildValidation(ctx *pulumi.Context,
	name string, args *BranchPolicyBuildValidationArgs, opts ...pulumi.ResourceOption) (*BranchPolicyBuildValidation, error)

NewBranchPolicyBuildValidation registers a new resource with the given unique name, arguments, and options.

func (*BranchPolicyBuildValidation) ElementType

func (*BranchPolicyBuildValidation) ElementType() reflect.Type

func (*BranchPolicyBuildValidation) ToBranchPolicyBuildValidationOutput

func (i *BranchPolicyBuildValidation) ToBranchPolicyBuildValidationOutput() BranchPolicyBuildValidationOutput

func (*BranchPolicyBuildValidation) ToBranchPolicyBuildValidationOutputWithContext

func (i *BranchPolicyBuildValidation) ToBranchPolicyBuildValidationOutputWithContext(ctx context.Context) BranchPolicyBuildValidationOutput

type BranchPolicyBuildValidationArgs

type BranchPolicyBuildValidationArgs struct {
	// A flag indicating if the policy should be blocking. Defaults to `true`.
	Blocking pulumi.BoolPtrInput
	// A flag indicating if the policy should be enabled. Defaults to `true`.
	Enabled pulumi.BoolPtrInput
	// The ID of the project in which the policy will be created.
	ProjectId pulumi.StringInput
	// Configuration for the policy. This block must be defined exactly once.
	Settings BranchPolicyBuildValidationSettingsInput
}

The set of arguments for constructing a BranchPolicyBuildValidation resource.

func (BranchPolicyBuildValidationArgs) ElementType

type BranchPolicyBuildValidationArray

type BranchPolicyBuildValidationArray []BranchPolicyBuildValidationInput

func (BranchPolicyBuildValidationArray) ElementType

func (BranchPolicyBuildValidationArray) ToBranchPolicyBuildValidationArrayOutput

func (i BranchPolicyBuildValidationArray) ToBranchPolicyBuildValidationArrayOutput() BranchPolicyBuildValidationArrayOutput

func (BranchPolicyBuildValidationArray) ToBranchPolicyBuildValidationArrayOutputWithContext

func (i BranchPolicyBuildValidationArray) ToBranchPolicyBuildValidationArrayOutputWithContext(ctx context.Context) BranchPolicyBuildValidationArrayOutput

type BranchPolicyBuildValidationArrayInput

type BranchPolicyBuildValidationArrayInput interface {
	pulumi.Input

	ToBranchPolicyBuildValidationArrayOutput() BranchPolicyBuildValidationArrayOutput
	ToBranchPolicyBuildValidationArrayOutputWithContext(context.Context) BranchPolicyBuildValidationArrayOutput
}

BranchPolicyBuildValidationArrayInput is an input type that accepts BranchPolicyBuildValidationArray and BranchPolicyBuildValidationArrayOutput values. You can construct a concrete instance of `BranchPolicyBuildValidationArrayInput` via:

BranchPolicyBuildValidationArray{ BranchPolicyBuildValidationArgs{...} }

type BranchPolicyBuildValidationArrayOutput

type BranchPolicyBuildValidationArrayOutput struct{ *pulumi.OutputState }

func (BranchPolicyBuildValidationArrayOutput) ElementType

func (BranchPolicyBuildValidationArrayOutput) Index

func (BranchPolicyBuildValidationArrayOutput) ToBranchPolicyBuildValidationArrayOutput

func (o BranchPolicyBuildValidationArrayOutput) ToBranchPolicyBuildValidationArrayOutput() BranchPolicyBuildValidationArrayOutput

func (BranchPolicyBuildValidationArrayOutput) ToBranchPolicyBuildValidationArrayOutputWithContext

func (o BranchPolicyBuildValidationArrayOutput) ToBranchPolicyBuildValidationArrayOutputWithContext(ctx context.Context) BranchPolicyBuildValidationArrayOutput

type BranchPolicyBuildValidationInput

type BranchPolicyBuildValidationInput interface {
	pulumi.Input

	ToBranchPolicyBuildValidationOutput() BranchPolicyBuildValidationOutput
	ToBranchPolicyBuildValidationOutputWithContext(ctx context.Context) BranchPolicyBuildValidationOutput
}

type BranchPolicyBuildValidationMap

type BranchPolicyBuildValidationMap map[string]BranchPolicyBuildValidationInput

func (BranchPolicyBuildValidationMap) ElementType

func (BranchPolicyBuildValidationMap) ToBranchPolicyBuildValidationMapOutput

func (i BranchPolicyBuildValidationMap) ToBranchPolicyBuildValidationMapOutput() BranchPolicyBuildValidationMapOutput

func (BranchPolicyBuildValidationMap) ToBranchPolicyBuildValidationMapOutputWithContext

func (i BranchPolicyBuildValidationMap) ToBranchPolicyBuildValidationMapOutputWithContext(ctx context.Context) BranchPolicyBuildValidationMapOutput

type BranchPolicyBuildValidationMapInput

type BranchPolicyBuildValidationMapInput interface {
	pulumi.Input

	ToBranchPolicyBuildValidationMapOutput() BranchPolicyBuildValidationMapOutput
	ToBranchPolicyBuildValidationMapOutputWithContext(context.Context) BranchPolicyBuildValidationMapOutput
}

BranchPolicyBuildValidationMapInput is an input type that accepts BranchPolicyBuildValidationMap and BranchPolicyBuildValidationMapOutput values. You can construct a concrete instance of `BranchPolicyBuildValidationMapInput` via:

BranchPolicyBuildValidationMap{ "key": BranchPolicyBuildValidationArgs{...} }

type BranchPolicyBuildValidationMapOutput

type BranchPolicyBuildValidationMapOutput struct{ *pulumi.OutputState }

func (BranchPolicyBuildValidationMapOutput) ElementType

func (BranchPolicyBuildValidationMapOutput) MapIndex

func (BranchPolicyBuildValidationMapOutput) ToBranchPolicyBuildValidationMapOutput

func (o BranchPolicyBuildValidationMapOutput) ToBranchPolicyBuildValidationMapOutput() BranchPolicyBuildValidationMapOutput

func (BranchPolicyBuildValidationMapOutput) ToBranchPolicyBuildValidationMapOutputWithContext

func (o BranchPolicyBuildValidationMapOutput) ToBranchPolicyBuildValidationMapOutputWithContext(ctx context.Context) BranchPolicyBuildValidationMapOutput

type BranchPolicyBuildValidationOutput

type BranchPolicyBuildValidationOutput struct{ *pulumi.OutputState }

func (BranchPolicyBuildValidationOutput) Blocking added in v2.5.0

A flag indicating if the policy should be blocking. Defaults to `true`.

func (BranchPolicyBuildValidationOutput) ElementType

func (BranchPolicyBuildValidationOutput) Enabled added in v2.5.0

A flag indicating if the policy should be enabled. Defaults to `true`.

func (BranchPolicyBuildValidationOutput) ProjectId added in v2.5.0

The ID of the project in which the policy will be created.

func (BranchPolicyBuildValidationOutput) Settings added in v2.5.0

Configuration for the policy. This block must be defined exactly once.

func (BranchPolicyBuildValidationOutput) ToBranchPolicyBuildValidationOutput

func (o BranchPolicyBuildValidationOutput) ToBranchPolicyBuildValidationOutput() BranchPolicyBuildValidationOutput

func (BranchPolicyBuildValidationOutput) ToBranchPolicyBuildValidationOutputWithContext

func (o BranchPolicyBuildValidationOutput) ToBranchPolicyBuildValidationOutputWithContext(ctx context.Context) BranchPolicyBuildValidationOutput

type BranchPolicyBuildValidationSettings

type BranchPolicyBuildValidationSettings struct {
	// The ID of the build to monitor for the policy.
	BuildDefinitionId int `pulumi:"buildDefinitionId"`
	// The display name for the policy.
	DisplayName string `pulumi:"displayName"`
	// 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.
	FilenamePatterns []string `pulumi:"filenamePatterns"`
	// If set to true, the build will need to be manually queued. Defaults to `false`
	ManualQueueOnly *bool `pulumi:"manualQueueOnly"`
	// True if the build should queue on source updates only. Defaults to `true`.
	QueueOnSourceUpdateOnly *bool `pulumi:"queueOnSourceUpdateOnly"`
	// Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
	Scopes []BranchPolicyBuildValidationSettingsScope `pulumi:"scopes"`
	// The number of minutes for which the build is valid. If `0`, the build will not expire. Defaults to `720` (12 hours).
	ValidDuration *int `pulumi:"validDuration"`
}

type BranchPolicyBuildValidationSettingsArgs

type BranchPolicyBuildValidationSettingsArgs struct {
	// The ID of the build to monitor for the policy.
	BuildDefinitionId pulumi.IntInput `pulumi:"buildDefinitionId"`
	// The display name for the policy.
	DisplayName pulumi.StringInput `pulumi:"displayName"`
	// 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.
	FilenamePatterns pulumi.StringArrayInput `pulumi:"filenamePatterns"`
	// If set to true, the build will need to be manually queued. Defaults to `false`
	ManualQueueOnly pulumi.BoolPtrInput `pulumi:"manualQueueOnly"`
	// True if the build should queue on source updates only. Defaults to `true`.
	QueueOnSourceUpdateOnly pulumi.BoolPtrInput `pulumi:"queueOnSourceUpdateOnly"`
	// Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
	Scopes BranchPolicyBuildValidationSettingsScopeArrayInput `pulumi:"scopes"`
	// The number of minutes for which the build is valid. If `0`, the build will not expire. Defaults to `720` (12 hours).
	ValidDuration pulumi.IntPtrInput `pulumi:"validDuration"`
}

func (BranchPolicyBuildValidationSettingsArgs) ElementType

func (BranchPolicyBuildValidationSettingsArgs) ToBranchPolicyBuildValidationSettingsOutput

func (i BranchPolicyBuildValidationSettingsArgs) ToBranchPolicyBuildValidationSettingsOutput() BranchPolicyBuildValidationSettingsOutput

func (BranchPolicyBuildValidationSettingsArgs) ToBranchPolicyBuildValidationSettingsOutputWithContext

func (i BranchPolicyBuildValidationSettingsArgs) ToBranchPolicyBuildValidationSettingsOutputWithContext(ctx context.Context) BranchPolicyBuildValidationSettingsOutput

func (BranchPolicyBuildValidationSettingsArgs) ToBranchPolicyBuildValidationSettingsPtrOutput

func (i BranchPolicyBuildValidationSettingsArgs) ToBranchPolicyBuildValidationSettingsPtrOutput() BranchPolicyBuildValidationSettingsPtrOutput

func (BranchPolicyBuildValidationSettingsArgs) ToBranchPolicyBuildValidationSettingsPtrOutputWithContext

func (i BranchPolicyBuildValidationSettingsArgs) ToBranchPolicyBuildValidationSettingsPtrOutputWithContext(ctx context.Context) BranchPolicyBuildValidationSettingsPtrOutput

type BranchPolicyBuildValidationSettingsInput

type BranchPolicyBuildValidationSettingsInput interface {
	pulumi.Input

	ToBranchPolicyBuildValidationSettingsOutput() BranchPolicyBuildValidationSettingsOutput
	ToBranchPolicyBuildValidationSettingsOutputWithContext(context.Context) BranchPolicyBuildValidationSettingsOutput
}

BranchPolicyBuildValidationSettingsInput is an input type that accepts BranchPolicyBuildValidationSettingsArgs and BranchPolicyBuildValidationSettingsOutput values. You can construct a concrete instance of `BranchPolicyBuildValidationSettingsInput` via:

BranchPolicyBuildValidationSettingsArgs{...}

type BranchPolicyBuildValidationSettingsOutput

type BranchPolicyBuildValidationSettingsOutput struct{ *pulumi.OutputState }

func (BranchPolicyBuildValidationSettingsOutput) BuildDefinitionId

The ID of the build to monitor for the policy.

func (BranchPolicyBuildValidationSettingsOutput) DisplayName

The display name for the policy.

func (BranchPolicyBuildValidationSettingsOutput) ElementType

func (BranchPolicyBuildValidationSettingsOutput) FilenamePatterns

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.

func (BranchPolicyBuildValidationSettingsOutput) ManualQueueOnly

If set to true, the build will need to be manually queued. Defaults to `false`

func (BranchPolicyBuildValidationSettingsOutput) QueueOnSourceUpdateOnly

True if the build should queue on source updates only. Defaults to `true`.

func (BranchPolicyBuildValidationSettingsOutput) Scopes

Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.

func (BranchPolicyBuildValidationSettingsOutput) ToBranchPolicyBuildValidationSettingsOutput

func (o BranchPolicyBuildValidationSettingsOutput) ToBranchPolicyBuildValidationSettingsOutput() BranchPolicyBuildValidationSettingsOutput

func (BranchPolicyBuildValidationSettingsOutput) ToBranchPolicyBuildValidationSettingsOutputWithContext

func (o BranchPolicyBuildValidationSettingsOutput) ToBranchPolicyBuildValidationSettingsOutputWithContext(ctx context.Context) BranchPolicyBuildValidationSettingsOutput

func (BranchPolicyBuildValidationSettingsOutput) ToBranchPolicyBuildValidationSettingsPtrOutput

func (o BranchPolicyBuildValidationSettingsOutput) ToBranchPolicyBuildValidationSettingsPtrOutput() BranchPolicyBuildValidationSettingsPtrOutput

func (BranchPolicyBuildValidationSettingsOutput) ToBranchPolicyBuildValidationSettingsPtrOutputWithContext

func (o BranchPolicyBuildValidationSettingsOutput) ToBranchPolicyBuildValidationSettingsPtrOutputWithContext(ctx context.Context) BranchPolicyBuildValidationSettingsPtrOutput

func (BranchPolicyBuildValidationSettingsOutput) ValidDuration

The number of minutes for which the build is valid. If `0`, the build will not expire. Defaults to `720` (12 hours).

type BranchPolicyBuildValidationSettingsPtrInput

type BranchPolicyBuildValidationSettingsPtrInput interface {
	pulumi.Input

	ToBranchPolicyBuildValidationSettingsPtrOutput() BranchPolicyBuildValidationSettingsPtrOutput
	ToBranchPolicyBuildValidationSettingsPtrOutputWithContext(context.Context) BranchPolicyBuildValidationSettingsPtrOutput
}

BranchPolicyBuildValidationSettingsPtrInput is an input type that accepts BranchPolicyBuildValidationSettingsArgs, BranchPolicyBuildValidationSettingsPtr and BranchPolicyBuildValidationSettingsPtrOutput values. You can construct a concrete instance of `BranchPolicyBuildValidationSettingsPtrInput` via:

        BranchPolicyBuildValidationSettingsArgs{...}

or:

        nil

type BranchPolicyBuildValidationSettingsPtrOutput

type BranchPolicyBuildValidationSettingsPtrOutput struct{ *pulumi.OutputState }

func (BranchPolicyBuildValidationSettingsPtrOutput) BuildDefinitionId

The ID of the build to monitor for the policy.

func (BranchPolicyBuildValidationSettingsPtrOutput) DisplayName

The display name for the policy.

func (BranchPolicyBuildValidationSettingsPtrOutput) Elem

func (BranchPolicyBuildValidationSettingsPtrOutput) ElementType

func (BranchPolicyBuildValidationSettingsPtrOutput) FilenamePatterns

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.

func (BranchPolicyBuildValidationSettingsPtrOutput) ManualQueueOnly

If set to true, the build will need to be manually queued. Defaults to `false`

func (BranchPolicyBuildValidationSettingsPtrOutput) QueueOnSourceUpdateOnly

True if the build should queue on source updates only. Defaults to `true`.

func (BranchPolicyBuildValidationSettingsPtrOutput) Scopes

Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.

func (BranchPolicyBuildValidationSettingsPtrOutput) ToBranchPolicyBuildValidationSettingsPtrOutput

func (o BranchPolicyBuildValidationSettingsPtrOutput) ToBranchPolicyBuildValidationSettingsPtrOutput() BranchPolicyBuildValidationSettingsPtrOutput

func (BranchPolicyBuildValidationSettingsPtrOutput) ToBranchPolicyBuildValidationSettingsPtrOutputWithContext

func (o BranchPolicyBuildValidationSettingsPtrOutput) ToBranchPolicyBuildValidationSettingsPtrOutputWithContext(ctx context.Context) BranchPolicyBuildValidationSettingsPtrOutput

func (BranchPolicyBuildValidationSettingsPtrOutput) ValidDuration

The number of minutes for which the build is valid. If `0`, the build will not expire. Defaults to `720` (12 hours).

type BranchPolicyBuildValidationSettingsScope

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

type BranchPolicyBuildValidationSettingsScopeArgs

type BranchPolicyBuildValidationSettingsScopeArgs struct {
	// The match type to use when applying the policy. Supported values are `Exact` (default), `Prefix` or `DefaultBranch`.
	MatchType pulumi.StringPtrInput `pulumi:"matchType"`
	// The repository ID. Needed only if the scope of the policy will be limited to a single repository. If `matchType` is `DefaultBranch`, this should not be defined.
	RepositoryId pulumi.StringPtrInput `pulumi:"repositoryId"`
	// The ref pattern to use for the match when `matchType` other than `DefaultBranch`. If `matchType` is `Exact`, this should be a qualified ref such as `refs/heads/master`. If `matchType` is `Prefix`, this should be a ref path such as `refs/heads/releases`.
	RepositoryRef pulumi.StringPtrInput `pulumi:"repositoryRef"`
}

func (BranchPolicyBuildValidationSettingsScopeArgs) ElementType

func (BranchPolicyBuildValidationSettingsScopeArgs) ToBranchPolicyBuildValidationSettingsScopeOutput

func (i BranchPolicyBuildValidationSettingsScopeArgs) ToBranchPolicyBuildValidationSettingsScopeOutput() BranchPolicyBuildValidationSettingsScopeOutput

func (BranchPolicyBuildValidationSettingsScopeArgs) ToBranchPolicyBuildValidationSettingsScopeOutputWithContext

func (i BranchPolicyBuildValidationSettingsScopeArgs) ToBranchPolicyBuildValidationSettingsScopeOutputWithContext(ctx context.Context) BranchPolicyBuildValidationSettingsScopeOutput

type BranchPolicyBuildValidationSettingsScopeArray

type BranchPolicyBuildValidationSettingsScopeArray []BranchPolicyBuildValidationSettingsScopeInput

func (BranchPolicyBuildValidationSettingsScopeArray) ElementType

func (BranchPolicyBuildValidationSettingsScopeArray) ToBranchPolicyBuildValidationSettingsScopeArrayOutput

func (i BranchPolicyBuildValidationSettingsScopeArray) ToBranchPolicyBuildValidationSettingsScopeArrayOutput() BranchPolicyBuildValidationSettingsScopeArrayOutput

func (BranchPolicyBuildValidationSettingsScopeArray) ToBranchPolicyBuildValidationSettingsScopeArrayOutputWithContext

func (i BranchPolicyBuildValidationSettingsScopeArray) ToBranchPolicyBuildValidationSettingsScopeArrayOutputWithContext(ctx context.Context) BranchPolicyBuildValidationSettingsScopeArrayOutput

type BranchPolicyBuildValidationSettingsScopeArrayInput

type BranchPolicyBuildValidationSettingsScopeArrayInput interface {
	pulumi.Input

	ToBranchPolicyBuildValidationSettingsScopeArrayOutput() BranchPolicyBuildValidationSettingsScopeArrayOutput
	ToBranchPolicyBuildValidationSettingsScopeArrayOutputWithContext(context.Context) BranchPolicyBuildValidationSettingsScopeArrayOutput
}

BranchPolicyBuildValidationSettingsScopeArrayInput is an input type that accepts BranchPolicyBuildValidationSettingsScopeArray and BranchPolicyBuildValidationSettingsScopeArrayOutput values. You can construct a concrete instance of `BranchPolicyBuildValidationSettingsScopeArrayInput` via:

BranchPolicyBuildValidationSettingsScopeArray{ BranchPolicyBuildValidationSettingsScopeArgs{...} }

type BranchPolicyBuildValidationSettingsScopeArrayOutput

type BranchPolicyBuildValidationSettingsScopeArrayOutput struct{ *pulumi.OutputState }

func (BranchPolicyBuildValidationSettingsScopeArrayOutput) ElementType

func (BranchPolicyBuildValidationSettingsScopeArrayOutput) Index

func (BranchPolicyBuildValidationSettingsScopeArrayOutput) ToBranchPolicyBuildValidationSettingsScopeArrayOutput

func (o BranchPolicyBuildValidationSettingsScopeArrayOutput) ToBranchPolicyBuildValidationSettingsScopeArrayOutput() BranchPolicyBuildValidationSettingsScopeArrayOutput

func (BranchPolicyBuildValidationSettingsScopeArrayOutput) ToBranchPolicyBuildValidationSettingsScopeArrayOutputWithContext

func (o BranchPolicyBuildValidationSettingsScopeArrayOutput) ToBranchPolicyBuildValidationSettingsScopeArrayOutputWithContext(ctx context.Context) BranchPolicyBuildValidationSettingsScopeArrayOutput

type BranchPolicyBuildValidationSettingsScopeInput

type BranchPolicyBuildValidationSettingsScopeInput interface {
	pulumi.Input

	ToBranchPolicyBuildValidationSettingsScopeOutput() BranchPolicyBuildValidationSettingsScopeOutput
	ToBranchPolicyBuildValidationSettingsScopeOutputWithContext(context.Context) BranchPolicyBuildValidationSettingsScopeOutput
}

BranchPolicyBuildValidationSettingsScopeInput is an input type that accepts BranchPolicyBuildValidationSettingsScopeArgs and BranchPolicyBuildValidationSettingsScopeOutput values. You can construct a concrete instance of `BranchPolicyBuildValidationSettingsScopeInput` via:

BranchPolicyBuildValidationSettingsScopeArgs{...}

type BranchPolicyBuildValidationSettingsScopeOutput

type BranchPolicyBuildValidationSettingsScopeOutput struct{ *pulumi.OutputState }

func (BranchPolicyBuildValidationSettingsScopeOutput) ElementType

func (BranchPolicyBuildValidationSettingsScopeOutput) MatchType

The match type to use when applying the policy. Supported values are `Exact` (default), `Prefix` or `DefaultBranch`.

func (BranchPolicyBuildValidationSettingsScopeOutput) RepositoryId

The repository ID. Needed only if the scope of the policy will be limited to a single repository. If `matchType` is `DefaultBranch`, this should not be defined.

func (BranchPolicyBuildValidationSettingsScopeOutput) RepositoryRef

The ref pattern to use for the match when `matchType` other than `DefaultBranch`. If `matchType` is `Exact`, this should be a qualified ref such as `refs/heads/master`. If `matchType` is `Prefix`, this should be a ref path such as `refs/heads/releases`.

func (BranchPolicyBuildValidationSettingsScopeOutput) ToBranchPolicyBuildValidationSettingsScopeOutput

func (o BranchPolicyBuildValidationSettingsScopeOutput) ToBranchPolicyBuildValidationSettingsScopeOutput() BranchPolicyBuildValidationSettingsScopeOutput

func (BranchPolicyBuildValidationSettingsScopeOutput) ToBranchPolicyBuildValidationSettingsScopeOutputWithContext

func (o BranchPolicyBuildValidationSettingsScopeOutput) ToBranchPolicyBuildValidationSettingsScopeOutputWithContext(ctx context.Context) BranchPolicyBuildValidationSettingsScopeOutput

type BranchPolicyBuildValidationState

type BranchPolicyBuildValidationState struct {
	// A flag indicating if the policy should be blocking. Defaults to `true`.
	Blocking pulumi.BoolPtrInput
	// A flag indicating if the policy should be enabled. Defaults to `true`.
	Enabled pulumi.BoolPtrInput
	// The ID of the project in which the policy will be created.
	ProjectId pulumi.StringPtrInput
	// Configuration for the policy. This block must be defined exactly once.
	Settings BranchPolicyBuildValidationSettingsPtrInput
}

func (BranchPolicyBuildValidationState) ElementType

type BranchPolicyMinReviewers deprecated

type BranchPolicyMinReviewers struct {
	pulumi.CustomResourceState

	// A flag indicating if the policy should be blocking. Defaults to `true`.
	Blocking pulumi.BoolPtrOutput `pulumi:"blocking"`
	// A flag indicating if the policy should be enabled. Defaults to `true`.
	Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
	// The ID of the project in which the policy will be created.
	ProjectId pulumi.StringOutput `pulumi:"projectId"`
	// A `settings` block as defined below.. This block must be defined exactly once.
	Settings BranchPolicyMinReviewersSettingsOutput `pulumi:"settings"`
}

Branch policy for reviewers on pull requests. Includes the minimum number of reviewers and other conditions.

## Example Usage

<!--Start PulumiCodeChooser --> ```go package main

import (

"github.com/pulumi/pulumi-azuredevops/sdk/v2/go/azuredevops"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleProject, err := azuredevops.NewProject(ctx, "exampleProject", nil)
		if err != nil {
			return err
		}
		exampleGit, err := azuredevops.NewGit(ctx, "exampleGit", &azuredevops.GitArgs{
			ProjectId: exampleProject.ID(),
			Initialization: &azuredevops.GitInitializationArgs{
				InitType: pulumi.String("Clean"),
			},
		})
		if err != nil {
			return err
		}
		_, err = azuredevops.NewBranchPolicyMinReviewers(ctx, "exampleBranchPolicyMinReviewers", &azuredevops.BranchPolicyMinReviewersArgs{
			ProjectId: exampleProject.ID(),
			Enabled:   pulumi.Bool(true),
			Blocking:  pulumi.Bool(true),
			Settings: &azuredevops.BranchPolicyMinReviewersSettingsArgs{
				ReviewerCount:                     pulumi.Int(7),
				SubmitterCanVote:                  pulumi.Bool(false),
				LastPusherCannotApprove:           pulumi.Bool(true),
				AllowCompletionWithRejectsOrWaits: pulumi.Bool(false),
				OnPushResetApprovedVotes:          pulumi.Bool(true),
				OnLastIterationRequireVote:        pulumi.Bool(false),
				Scopes: azuredevops.BranchPolicyMinReviewersSettingsScopeArray{
					&azuredevops.BranchPolicyMinReviewersSettingsScopeArgs{
						RepositoryId:  exampleGit.ID(),
						RepositoryRef: exampleGit.DefaultBranch,
						MatchType:     pulumi.String("Exact"),
					},
					&azuredevops.BranchPolicyMinReviewersSettingsScopeArgs{
						RepositoryId:  nil,
						RepositoryRef: pulumi.String("refs/heads/releases"),
						MatchType:     pulumi.String("Prefix"),
					},
					&azuredevops.BranchPolicyMinReviewersSettingsScopeArgs{
						MatchType: pulumi.String("DefaultBranch"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` <!--End PulumiCodeChooser -->

## Relevant Links

- [Azure DevOps Service REST API 7.0 - Policy Configurations](https://docs.microsoft.com/en-us/rest/api/azure/devops/policy/configurations/create?view=azure-devops-rest-7.0)

## Import

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

```sh $ pulumi import azuredevops:Policy/branchPolicyMinReviewers:BranchPolicyMinReviewers example 00000000-0000-0000-0000-000000000000/0 ```

Deprecated: azuredevops.policy.BranchPolicyMinReviewers has been deprecated in favor of azuredevops.BranchPolicyMinReviewers

func GetBranchPolicyMinReviewers

func GetBranchPolicyMinReviewers(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *BranchPolicyMinReviewersState, opts ...pulumi.ResourceOption) (*BranchPolicyMinReviewers, error)

GetBranchPolicyMinReviewers gets an existing BranchPolicyMinReviewers resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewBranchPolicyMinReviewers

func NewBranchPolicyMinReviewers(ctx *pulumi.Context,
	name string, args *BranchPolicyMinReviewersArgs, opts ...pulumi.ResourceOption) (*BranchPolicyMinReviewers, error)

NewBranchPolicyMinReviewers registers a new resource with the given unique name, arguments, and options.

func (*BranchPolicyMinReviewers) ElementType

func (*BranchPolicyMinReviewers) ElementType() reflect.Type

func (*BranchPolicyMinReviewers) ToBranchPolicyMinReviewersOutput

func (i *BranchPolicyMinReviewers) ToBranchPolicyMinReviewersOutput() BranchPolicyMinReviewersOutput

func (*BranchPolicyMinReviewers) ToBranchPolicyMinReviewersOutputWithContext

func (i *BranchPolicyMinReviewers) ToBranchPolicyMinReviewersOutputWithContext(ctx context.Context) BranchPolicyMinReviewersOutput

type BranchPolicyMinReviewersArgs

type BranchPolicyMinReviewersArgs struct {
	// A flag indicating if the policy should be blocking. Defaults to `true`.
	Blocking pulumi.BoolPtrInput
	// A flag indicating if the policy should be enabled. Defaults to `true`.
	Enabled pulumi.BoolPtrInput
	// The ID of the project in which the policy will be created.
	ProjectId pulumi.StringInput
	// A `settings` block as defined below.. This block must be defined exactly once.
	Settings BranchPolicyMinReviewersSettingsInput
}

The set of arguments for constructing a BranchPolicyMinReviewers resource.

func (BranchPolicyMinReviewersArgs) ElementType

type BranchPolicyMinReviewersArray

type BranchPolicyMinReviewersArray []BranchPolicyMinReviewersInput

func (BranchPolicyMinReviewersArray) ElementType

func (BranchPolicyMinReviewersArray) ToBranchPolicyMinReviewersArrayOutput

func (i BranchPolicyMinReviewersArray) ToBranchPolicyMinReviewersArrayOutput() BranchPolicyMinReviewersArrayOutput

func (BranchPolicyMinReviewersArray) ToBranchPolicyMinReviewersArrayOutputWithContext

func (i BranchPolicyMinReviewersArray) ToBranchPolicyMinReviewersArrayOutputWithContext(ctx context.Context) BranchPolicyMinReviewersArrayOutput

type BranchPolicyMinReviewersArrayInput

type BranchPolicyMinReviewersArrayInput interface {
	pulumi.Input

	ToBranchPolicyMinReviewersArrayOutput() BranchPolicyMinReviewersArrayOutput
	ToBranchPolicyMinReviewersArrayOutputWithContext(context.Context) BranchPolicyMinReviewersArrayOutput
}

BranchPolicyMinReviewersArrayInput is an input type that accepts BranchPolicyMinReviewersArray and BranchPolicyMinReviewersArrayOutput values. You can construct a concrete instance of `BranchPolicyMinReviewersArrayInput` via:

BranchPolicyMinReviewersArray{ BranchPolicyMinReviewersArgs{...} }

type BranchPolicyMinReviewersArrayOutput

type BranchPolicyMinReviewersArrayOutput struct{ *pulumi.OutputState }

func (BranchPolicyMinReviewersArrayOutput) ElementType

func (BranchPolicyMinReviewersArrayOutput) Index

func (BranchPolicyMinReviewersArrayOutput) ToBranchPolicyMinReviewersArrayOutput

func (o BranchPolicyMinReviewersArrayOutput) ToBranchPolicyMinReviewersArrayOutput() BranchPolicyMinReviewersArrayOutput

func (BranchPolicyMinReviewersArrayOutput) ToBranchPolicyMinReviewersArrayOutputWithContext

func (o BranchPolicyMinReviewersArrayOutput) ToBranchPolicyMinReviewersArrayOutputWithContext(ctx context.Context) BranchPolicyMinReviewersArrayOutput

type BranchPolicyMinReviewersInput

type BranchPolicyMinReviewersInput interface {
	pulumi.Input

	ToBranchPolicyMinReviewersOutput() BranchPolicyMinReviewersOutput
	ToBranchPolicyMinReviewersOutputWithContext(ctx context.Context) BranchPolicyMinReviewersOutput
}

type BranchPolicyMinReviewersMap

type BranchPolicyMinReviewersMap map[string]BranchPolicyMinReviewersInput

func (BranchPolicyMinReviewersMap) ElementType

func (BranchPolicyMinReviewersMap) ToBranchPolicyMinReviewersMapOutput

func (i BranchPolicyMinReviewersMap) ToBranchPolicyMinReviewersMapOutput() BranchPolicyMinReviewersMapOutput

func (BranchPolicyMinReviewersMap) ToBranchPolicyMinReviewersMapOutputWithContext

func (i BranchPolicyMinReviewersMap) ToBranchPolicyMinReviewersMapOutputWithContext(ctx context.Context) BranchPolicyMinReviewersMapOutput

type BranchPolicyMinReviewersMapInput

type BranchPolicyMinReviewersMapInput interface {
	pulumi.Input

	ToBranchPolicyMinReviewersMapOutput() BranchPolicyMinReviewersMapOutput
	ToBranchPolicyMinReviewersMapOutputWithContext(context.Context) BranchPolicyMinReviewersMapOutput
}

BranchPolicyMinReviewersMapInput is an input type that accepts BranchPolicyMinReviewersMap and BranchPolicyMinReviewersMapOutput values. You can construct a concrete instance of `BranchPolicyMinReviewersMapInput` via:

BranchPolicyMinReviewersMap{ "key": BranchPolicyMinReviewersArgs{...} }

type BranchPolicyMinReviewersMapOutput

type BranchPolicyMinReviewersMapOutput struct{ *pulumi.OutputState }

func (BranchPolicyMinReviewersMapOutput) ElementType

func (BranchPolicyMinReviewersMapOutput) MapIndex

func (BranchPolicyMinReviewersMapOutput) ToBranchPolicyMinReviewersMapOutput

func (o BranchPolicyMinReviewersMapOutput) ToBranchPolicyMinReviewersMapOutput() BranchPolicyMinReviewersMapOutput

func (BranchPolicyMinReviewersMapOutput) ToBranchPolicyMinReviewersMapOutputWithContext

func (o BranchPolicyMinReviewersMapOutput) ToBranchPolicyMinReviewersMapOutputWithContext(ctx context.Context) BranchPolicyMinReviewersMapOutput

type BranchPolicyMinReviewersOutput

type BranchPolicyMinReviewersOutput struct{ *pulumi.OutputState }

func (BranchPolicyMinReviewersOutput) Blocking added in v2.5.0

A flag indicating if the policy should be blocking. Defaults to `true`.

func (BranchPolicyMinReviewersOutput) ElementType

func (BranchPolicyMinReviewersOutput) Enabled added in v2.5.0

A flag indicating if the policy should be enabled. Defaults to `true`.

func (BranchPolicyMinReviewersOutput) ProjectId added in v2.5.0

The ID of the project in which the policy will be created.

func (BranchPolicyMinReviewersOutput) Settings added in v2.5.0

A `settings` block as defined below.. This block must be defined exactly once.

func (BranchPolicyMinReviewersOutput) ToBranchPolicyMinReviewersOutput

func (o BranchPolicyMinReviewersOutput) ToBranchPolicyMinReviewersOutput() BranchPolicyMinReviewersOutput

func (BranchPolicyMinReviewersOutput) ToBranchPolicyMinReviewersOutputWithContext

func (o BranchPolicyMinReviewersOutput) ToBranchPolicyMinReviewersOutputWithContext(ctx context.Context) BranchPolicyMinReviewersOutput

type BranchPolicyMinReviewersSettings

type BranchPolicyMinReviewersSettings struct {
	// Allow completion even if some reviewers vote to wait or reject. Defaults to `false`.
	AllowCompletionWithRejectsOrWaits *bool `pulumi:"allowCompletionWithRejectsOrWaits"`
	// Prohibit the most recent pusher from approving their own changes. Defaults to `false`.
	LastPusherCannotApprove *bool `pulumi:"lastPusherCannotApprove"`
	// On last iteration require vote. Defaults to `false`.
	OnLastIterationRequireVote *bool `pulumi:"onLastIterationRequireVote"`
	// When new changes are pushed reset all code reviewer votes. Defaults to `false`.
	//
	// > **Note:** If `onPushResetAllVotes` is `true` then `onPushResetApprovedVotes` will be set to `true`. To enable `onPushResetApprovedVotes`, you need explicitly set `onPushResetAllVotes` `false` or not configure.
	OnPushResetAllVotes *bool `pulumi:"onPushResetAllVotes"`
	// When new changes are pushed reset all approval votes (does not reset votes to reject or wait). Defaults to `false`.
	OnPushResetApprovedVotes *bool `pulumi:"onPushResetApprovedVotes"`
	// The number of reviewers needed to approve.
	ReviewerCount *int `pulumi:"reviewerCount"`
	// A `scope` block as defined below. Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
	Scopes []BranchPolicyMinReviewersSettingsScope `pulumi:"scopes"`
	// Allow requesters to approve their own changes. Defaults to `false`.
	SubmitterCanVote *bool `pulumi:"submitterCanVote"`
}

type BranchPolicyMinReviewersSettingsArgs

type BranchPolicyMinReviewersSettingsArgs struct {
	// Allow completion even if some reviewers vote to wait or reject. Defaults to `false`.
	AllowCompletionWithRejectsOrWaits pulumi.BoolPtrInput `pulumi:"allowCompletionWithRejectsOrWaits"`
	// Prohibit the most recent pusher from approving their own changes. Defaults to `false`.
	LastPusherCannotApprove pulumi.BoolPtrInput `pulumi:"lastPusherCannotApprove"`
	// On last iteration require vote. Defaults to `false`.
	OnLastIterationRequireVote pulumi.BoolPtrInput `pulumi:"onLastIterationRequireVote"`
	// When new changes are pushed reset all code reviewer votes. Defaults to `false`.
	//
	// > **Note:** If `onPushResetAllVotes` is `true` then `onPushResetApprovedVotes` will be set to `true`. To enable `onPushResetApprovedVotes`, you need explicitly set `onPushResetAllVotes` `false` or not configure.
	OnPushResetAllVotes pulumi.BoolPtrInput `pulumi:"onPushResetAllVotes"`
	// When new changes are pushed reset all approval votes (does not reset votes to reject or wait). Defaults to `false`.
	OnPushResetApprovedVotes pulumi.BoolPtrInput `pulumi:"onPushResetApprovedVotes"`
	// The number of reviewers needed to approve.
	ReviewerCount pulumi.IntPtrInput `pulumi:"reviewerCount"`
	// A `scope` block as defined below. Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
	Scopes BranchPolicyMinReviewersSettingsScopeArrayInput `pulumi:"scopes"`
	// Allow requesters to approve their own changes. Defaults to `false`.
	SubmitterCanVote pulumi.BoolPtrInput `pulumi:"submitterCanVote"`
}

func (BranchPolicyMinReviewersSettingsArgs) ElementType

func (BranchPolicyMinReviewersSettingsArgs) ToBranchPolicyMinReviewersSettingsOutput

func (i BranchPolicyMinReviewersSettingsArgs) ToBranchPolicyMinReviewersSettingsOutput() BranchPolicyMinReviewersSettingsOutput

func (BranchPolicyMinReviewersSettingsArgs) ToBranchPolicyMinReviewersSettingsOutputWithContext

func (i BranchPolicyMinReviewersSettingsArgs) ToBranchPolicyMinReviewersSettingsOutputWithContext(ctx context.Context) BranchPolicyMinReviewersSettingsOutput

func (BranchPolicyMinReviewersSettingsArgs) ToBranchPolicyMinReviewersSettingsPtrOutput

func (i BranchPolicyMinReviewersSettingsArgs) ToBranchPolicyMinReviewersSettingsPtrOutput() BranchPolicyMinReviewersSettingsPtrOutput

func (BranchPolicyMinReviewersSettingsArgs) ToBranchPolicyMinReviewersSettingsPtrOutputWithContext

func (i BranchPolicyMinReviewersSettingsArgs) ToBranchPolicyMinReviewersSettingsPtrOutputWithContext(ctx context.Context) BranchPolicyMinReviewersSettingsPtrOutput

type BranchPolicyMinReviewersSettingsInput

type BranchPolicyMinReviewersSettingsInput interface {
	pulumi.Input

	ToBranchPolicyMinReviewersSettingsOutput() BranchPolicyMinReviewersSettingsOutput
	ToBranchPolicyMinReviewersSettingsOutputWithContext(context.Context) BranchPolicyMinReviewersSettingsOutput
}

BranchPolicyMinReviewersSettingsInput is an input type that accepts BranchPolicyMinReviewersSettingsArgs and BranchPolicyMinReviewersSettingsOutput values. You can construct a concrete instance of `BranchPolicyMinReviewersSettingsInput` via:

BranchPolicyMinReviewersSettingsArgs{...}

type BranchPolicyMinReviewersSettingsOutput

type BranchPolicyMinReviewersSettingsOutput struct{ *pulumi.OutputState }

func (BranchPolicyMinReviewersSettingsOutput) AllowCompletionWithRejectsOrWaits

func (o BranchPolicyMinReviewersSettingsOutput) AllowCompletionWithRejectsOrWaits() pulumi.BoolPtrOutput

Allow completion even if some reviewers vote to wait or reject. Defaults to `false`.

func (BranchPolicyMinReviewersSettingsOutput) ElementType

func (BranchPolicyMinReviewersSettingsOutput) LastPusherCannotApprove

func (o BranchPolicyMinReviewersSettingsOutput) LastPusherCannotApprove() pulumi.BoolPtrOutput

Prohibit the most recent pusher from approving their own changes. Defaults to `false`.

func (BranchPolicyMinReviewersSettingsOutput) OnLastIterationRequireVote

func (o BranchPolicyMinReviewersSettingsOutput) OnLastIterationRequireVote() pulumi.BoolPtrOutput

On last iteration require vote. Defaults to `false`.

func (BranchPolicyMinReviewersSettingsOutput) OnPushResetAllVotes

When new changes are pushed reset all code reviewer votes. Defaults to `false`.

> **Note:** If `onPushResetAllVotes` is `true` then `onPushResetApprovedVotes` will be set to `true`. To enable `onPushResetApprovedVotes`, you need explicitly set `onPushResetAllVotes` `false` or not configure.

func (BranchPolicyMinReviewersSettingsOutput) OnPushResetApprovedVotes

func (o BranchPolicyMinReviewersSettingsOutput) OnPushResetApprovedVotes() pulumi.BoolPtrOutput

When new changes are pushed reset all approval votes (does not reset votes to reject or wait). Defaults to `false`.

func (BranchPolicyMinReviewersSettingsOutput) ReviewerCount

The number of reviewers needed to approve.

func (BranchPolicyMinReviewersSettingsOutput) Scopes

A `scope` block as defined below. Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.

func (BranchPolicyMinReviewersSettingsOutput) SubmitterCanVote

Allow requesters to approve their own changes. Defaults to `false`.

func (BranchPolicyMinReviewersSettingsOutput) ToBranchPolicyMinReviewersSettingsOutput

func (o BranchPolicyMinReviewersSettingsOutput) ToBranchPolicyMinReviewersSettingsOutput() BranchPolicyMinReviewersSettingsOutput

func (BranchPolicyMinReviewersSettingsOutput) ToBranchPolicyMinReviewersSettingsOutputWithContext

func (o BranchPolicyMinReviewersSettingsOutput) ToBranchPolicyMinReviewersSettingsOutputWithContext(ctx context.Context) BranchPolicyMinReviewersSettingsOutput

func (BranchPolicyMinReviewersSettingsOutput) ToBranchPolicyMinReviewersSettingsPtrOutput

func (o BranchPolicyMinReviewersSettingsOutput) ToBranchPolicyMinReviewersSettingsPtrOutput() BranchPolicyMinReviewersSettingsPtrOutput

func (BranchPolicyMinReviewersSettingsOutput) ToBranchPolicyMinReviewersSettingsPtrOutputWithContext

func (o BranchPolicyMinReviewersSettingsOutput) ToBranchPolicyMinReviewersSettingsPtrOutputWithContext(ctx context.Context) BranchPolicyMinReviewersSettingsPtrOutput

type BranchPolicyMinReviewersSettingsPtrInput

type BranchPolicyMinReviewersSettingsPtrInput interface {
	pulumi.Input

	ToBranchPolicyMinReviewersSettingsPtrOutput() BranchPolicyMinReviewersSettingsPtrOutput
	ToBranchPolicyMinReviewersSettingsPtrOutputWithContext(context.Context) BranchPolicyMinReviewersSettingsPtrOutput
}

BranchPolicyMinReviewersSettingsPtrInput is an input type that accepts BranchPolicyMinReviewersSettingsArgs, BranchPolicyMinReviewersSettingsPtr and BranchPolicyMinReviewersSettingsPtrOutput values. You can construct a concrete instance of `BranchPolicyMinReviewersSettingsPtrInput` via:

        BranchPolicyMinReviewersSettingsArgs{...}

or:

        nil

type BranchPolicyMinReviewersSettingsPtrOutput

type BranchPolicyMinReviewersSettingsPtrOutput struct{ *pulumi.OutputState }

func (BranchPolicyMinReviewersSettingsPtrOutput) AllowCompletionWithRejectsOrWaits

func (o BranchPolicyMinReviewersSettingsPtrOutput) AllowCompletionWithRejectsOrWaits() pulumi.BoolPtrOutput

Allow completion even if some reviewers vote to wait or reject. Defaults to `false`.

func (BranchPolicyMinReviewersSettingsPtrOutput) Elem

func (BranchPolicyMinReviewersSettingsPtrOutput) ElementType

func (BranchPolicyMinReviewersSettingsPtrOutput) LastPusherCannotApprove

Prohibit the most recent pusher from approving their own changes. Defaults to `false`.

func (BranchPolicyMinReviewersSettingsPtrOutput) OnLastIterationRequireVote

func (o BranchPolicyMinReviewersSettingsPtrOutput) OnLastIterationRequireVote() pulumi.BoolPtrOutput

On last iteration require vote. Defaults to `false`.

func (BranchPolicyMinReviewersSettingsPtrOutput) OnPushResetAllVotes

When new changes are pushed reset all code reviewer votes. Defaults to `false`.

> **Note:** If `onPushResetAllVotes` is `true` then `onPushResetApprovedVotes` will be set to `true`. To enable `onPushResetApprovedVotes`, you need explicitly set `onPushResetAllVotes` `false` or not configure.

func (BranchPolicyMinReviewersSettingsPtrOutput) OnPushResetApprovedVotes

func (o BranchPolicyMinReviewersSettingsPtrOutput) OnPushResetApprovedVotes() pulumi.BoolPtrOutput

When new changes are pushed reset all approval votes (does not reset votes to reject or wait). Defaults to `false`.

func (BranchPolicyMinReviewersSettingsPtrOutput) ReviewerCount

The number of reviewers needed to approve.

func (BranchPolicyMinReviewersSettingsPtrOutput) Scopes

A `scope` block as defined below. Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.

func (BranchPolicyMinReviewersSettingsPtrOutput) SubmitterCanVote

Allow requesters to approve their own changes. Defaults to `false`.

func (BranchPolicyMinReviewersSettingsPtrOutput) ToBranchPolicyMinReviewersSettingsPtrOutput

func (o BranchPolicyMinReviewersSettingsPtrOutput) ToBranchPolicyMinReviewersSettingsPtrOutput() BranchPolicyMinReviewersSettingsPtrOutput

func (BranchPolicyMinReviewersSettingsPtrOutput) ToBranchPolicyMinReviewersSettingsPtrOutputWithContext

func (o BranchPolicyMinReviewersSettingsPtrOutput) ToBranchPolicyMinReviewersSettingsPtrOutputWithContext(ctx context.Context) BranchPolicyMinReviewersSettingsPtrOutput

type BranchPolicyMinReviewersSettingsScope

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

type BranchPolicyMinReviewersSettingsScopeArgs

type BranchPolicyMinReviewersSettingsScopeArgs struct {
	// The match type to use when applying the policy. Supported values are `Exact` (default), `Prefix` or `DefaultBranch`.
	MatchType pulumi.StringPtrInput `pulumi:"matchType"`
	// The repository ID. Needed only if the scope of the policy will be limited to a single repository. If `matchType` is `DefaultBranch`, this should not be defined.
	RepositoryId pulumi.StringPtrInput `pulumi:"repositoryId"`
	// The ref pattern to use for the match when `matchType` other than `DefaultBranch`. If `matchType` is `Exact`, this should be a qualified ref such as `refs/heads/master`. If `matchType` is `Prefix`, this should be a ref path such as `refs/heads/releases`.
	RepositoryRef pulumi.StringPtrInput `pulumi:"repositoryRef"`
}

func (BranchPolicyMinReviewersSettingsScopeArgs) ElementType

func (BranchPolicyMinReviewersSettingsScopeArgs) ToBranchPolicyMinReviewersSettingsScopeOutput

func (i BranchPolicyMinReviewersSettingsScopeArgs) ToBranchPolicyMinReviewersSettingsScopeOutput() BranchPolicyMinReviewersSettingsScopeOutput

func (BranchPolicyMinReviewersSettingsScopeArgs) ToBranchPolicyMinReviewersSettingsScopeOutputWithContext

func (i BranchPolicyMinReviewersSettingsScopeArgs) ToBranchPolicyMinReviewersSettingsScopeOutputWithContext(ctx context.Context) BranchPolicyMinReviewersSettingsScopeOutput

type BranchPolicyMinReviewersSettingsScopeArray

type BranchPolicyMinReviewersSettingsScopeArray []BranchPolicyMinReviewersSettingsScopeInput

func (BranchPolicyMinReviewersSettingsScopeArray) ElementType

func (BranchPolicyMinReviewersSettingsScopeArray) ToBranchPolicyMinReviewersSettingsScopeArrayOutput

func (i BranchPolicyMinReviewersSettingsScopeArray) ToBranchPolicyMinReviewersSettingsScopeArrayOutput() BranchPolicyMinReviewersSettingsScopeArrayOutput

func (BranchPolicyMinReviewersSettingsScopeArray) ToBranchPolicyMinReviewersSettingsScopeArrayOutputWithContext

func (i BranchPolicyMinReviewersSettingsScopeArray) ToBranchPolicyMinReviewersSettingsScopeArrayOutputWithContext(ctx context.Context) BranchPolicyMinReviewersSettingsScopeArrayOutput

type BranchPolicyMinReviewersSettingsScopeArrayInput

type BranchPolicyMinReviewersSettingsScopeArrayInput interface {
	pulumi.Input

	ToBranchPolicyMinReviewersSettingsScopeArrayOutput() BranchPolicyMinReviewersSettingsScopeArrayOutput
	ToBranchPolicyMinReviewersSettingsScopeArrayOutputWithContext(context.Context) BranchPolicyMinReviewersSettingsScopeArrayOutput
}

BranchPolicyMinReviewersSettingsScopeArrayInput is an input type that accepts BranchPolicyMinReviewersSettingsScopeArray and BranchPolicyMinReviewersSettingsScopeArrayOutput values. You can construct a concrete instance of `BranchPolicyMinReviewersSettingsScopeArrayInput` via:

BranchPolicyMinReviewersSettingsScopeArray{ BranchPolicyMinReviewersSettingsScopeArgs{...} }

type BranchPolicyMinReviewersSettingsScopeArrayOutput

type BranchPolicyMinReviewersSettingsScopeArrayOutput struct{ *pulumi.OutputState }

func (BranchPolicyMinReviewersSettingsScopeArrayOutput) ElementType

func (BranchPolicyMinReviewersSettingsScopeArrayOutput) Index

func (BranchPolicyMinReviewersSettingsScopeArrayOutput) ToBranchPolicyMinReviewersSettingsScopeArrayOutput

func (o BranchPolicyMinReviewersSettingsScopeArrayOutput) ToBranchPolicyMinReviewersSettingsScopeArrayOutput() BranchPolicyMinReviewersSettingsScopeArrayOutput

func (BranchPolicyMinReviewersSettingsScopeArrayOutput) ToBranchPolicyMinReviewersSettingsScopeArrayOutputWithContext

func (o BranchPolicyMinReviewersSettingsScopeArrayOutput) ToBranchPolicyMinReviewersSettingsScopeArrayOutputWithContext(ctx context.Context) BranchPolicyMinReviewersSettingsScopeArrayOutput

type BranchPolicyMinReviewersSettingsScopeInput

type BranchPolicyMinReviewersSettingsScopeInput interface {
	pulumi.Input

	ToBranchPolicyMinReviewersSettingsScopeOutput() BranchPolicyMinReviewersSettingsScopeOutput
	ToBranchPolicyMinReviewersSettingsScopeOutputWithContext(context.Context) BranchPolicyMinReviewersSettingsScopeOutput
}

BranchPolicyMinReviewersSettingsScopeInput is an input type that accepts BranchPolicyMinReviewersSettingsScopeArgs and BranchPolicyMinReviewersSettingsScopeOutput values. You can construct a concrete instance of `BranchPolicyMinReviewersSettingsScopeInput` via:

BranchPolicyMinReviewersSettingsScopeArgs{...}

type BranchPolicyMinReviewersSettingsScopeOutput

type BranchPolicyMinReviewersSettingsScopeOutput struct{ *pulumi.OutputState }

func (BranchPolicyMinReviewersSettingsScopeOutput) ElementType

func (BranchPolicyMinReviewersSettingsScopeOutput) MatchType

The match type to use when applying the policy. Supported values are `Exact` (default), `Prefix` or `DefaultBranch`.

func (BranchPolicyMinReviewersSettingsScopeOutput) RepositoryId

The repository ID. Needed only if the scope of the policy will be limited to a single repository. If `matchType` is `DefaultBranch`, this should not be defined.

func (BranchPolicyMinReviewersSettingsScopeOutput) RepositoryRef

The ref pattern to use for the match when `matchType` other than `DefaultBranch`. If `matchType` is `Exact`, this should be a qualified ref such as `refs/heads/master`. If `matchType` is `Prefix`, this should be a ref path such as `refs/heads/releases`.

func (BranchPolicyMinReviewersSettingsScopeOutput) ToBranchPolicyMinReviewersSettingsScopeOutput

func (o BranchPolicyMinReviewersSettingsScopeOutput) ToBranchPolicyMinReviewersSettingsScopeOutput() BranchPolicyMinReviewersSettingsScopeOutput

func (BranchPolicyMinReviewersSettingsScopeOutput) ToBranchPolicyMinReviewersSettingsScopeOutputWithContext

func (o BranchPolicyMinReviewersSettingsScopeOutput) ToBranchPolicyMinReviewersSettingsScopeOutputWithContext(ctx context.Context) BranchPolicyMinReviewersSettingsScopeOutput

type BranchPolicyMinReviewersState

type BranchPolicyMinReviewersState struct {
	// A flag indicating if the policy should be blocking. Defaults to `true`.
	Blocking pulumi.BoolPtrInput
	// A flag indicating if the policy should be enabled. Defaults to `true`.
	Enabled pulumi.BoolPtrInput
	// The ID of the project in which the policy will be created.
	ProjectId pulumi.StringPtrInput
	// A `settings` block as defined below.. This block must be defined exactly once.
	Settings BranchPolicyMinReviewersSettingsPtrInput
}

func (BranchPolicyMinReviewersState) ElementType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL