@pulumi/azuredevops 2.1.1 → 2.3.0-alpha.1637592987
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/agent/getPool.d.ts +10 -0
- package/agent/getPool.js +5 -0
- package/agent/getPool.js.map +1 -1
- package/agent/getPools.d.ts +3 -3
- package/agent/getPools.js +4 -3
- package/agent/getPools.js.map +1 -1
- package/agent/index.js +14 -7
- package/agent/index.js.map +1 -1
- package/agent/pool.js +1 -0
- package/agent/pool.js.map +1 -1
- package/agent/queue.js +1 -0
- package/agent/queue.js.map +1 -1
- package/areaPermissions.d.ts +1 -1
- package/areaPermissions.js +2 -1
- package/areaPermissions.js.map +1 -1
- package/branchPolicyAutoReviewers.d.ts +3 -3
- package/branchPolicyAutoReviewers.js +1 -0
- package/branchPolicyAutoReviewers.js.map +1 -1
- package/branchPolicyBuildValidation.js +1 -0
- package/branchPolicyBuildValidation.js.map +1 -1
- package/branchPolicyCommentResolution.js +1 -0
- package/branchPolicyCommentResolution.js.map +1 -1
- package/branchPolicyMergeTypes.js +1 -0
- package/branchPolicyMergeTypes.js.map +1 -1
- package/branchPolicyMinReviewers.js +1 -0
- package/branchPolicyMinReviewers.js.map +1 -1
- package/branchPolicyStatusCheck.js +1 -0
- package/branchPolicyStatusCheck.js.map +1 -1
- package/branchPolicyWorkItemLinking.js +1 -0
- package/branchPolicyWorkItemLinking.js.map +1 -1
- package/build/buildDefinition.js +1 -0
- package/build/buildDefinition.js.map +1 -1
- package/build/index.js +11 -4
- package/build/index.js.map +1 -1
- package/buildDefinition.js +1 -0
- package/buildDefinition.js.map +1 -1
- package/buildDefinitionPermissions.d.ts +1 -1
- package/buildDefinitionPermissions.js +2 -1
- package/buildDefinitionPermissions.js.map +1 -1
- package/config/index.js +11 -4
- package/config/index.js.map +1 -1
- package/config/vars.d.ts +2 -2
- package/config/vars.js +14 -9
- package/config/vars.js.map +1 -1
- package/core/getClientConfig.js +1 -0
- package/core/getClientConfig.js.map +1 -1
- package/core/getProject.d.ts +14 -0
- package/core/getProject.js +5 -0
- package/core/getProject.js.map +1 -1
- package/core/getProjects.d.ts +18 -4
- package/core/getProjects.js +9 -4
- package/core/getProjects.js.map +1 -1
- package/core/index.js +15 -8
- package/core/index.js.map +1 -1
- package/core/project.js +1 -0
- package/core/project.js.map +1 -1
- package/core/projectFeatures.js +1 -0
- package/core/projectFeatures.js.map +1 -1
- package/entitlement/index.js +11 -4
- package/entitlement/index.js.map +1 -1
- package/entitlement/user.js +1 -0
- package/entitlement/user.js.map +1 -1
- package/getAgentQueue.d.ts +16 -2
- package/getAgentQueue.js +7 -2
- package/getAgentQueue.js.map +1 -1
- package/getArea.d.ts +18 -0
- package/getArea.js +5 -0
- package/getArea.js.map +1 -1
- package/getClientConfig.js +1 -0
- package/getClientConfig.js.map +1 -1
- package/getGitRepository.d.ts +14 -0
- package/getGitRepository.js +5 -0
- package/getGitRepository.js.map +1 -1
- package/getGroup.d.ts +14 -0
- package/getGroup.js +5 -0
- package/getGroup.js.map +1 -1
- package/getIteration.d.ts +18 -0
- package/getIteration.js +5 -0
- package/getIteration.js.map +1 -1
- package/getPool.d.ts +10 -0
- package/getPool.js +5 -0
- package/getPool.js.map +1 -1
- package/getPools.d.ts +3 -3
- package/getPools.js +4 -3
- package/getPools.js.map +1 -1
- package/getProject.d.ts +14 -0
- package/getProject.js +5 -0
- package/getProject.js.map +1 -1
- package/getProjects.d.ts +18 -4
- package/getProjects.js +9 -4
- package/getProjects.js.map +1 -1
- package/getRepositories.d.ts +15 -0
- package/getRepositories.js +5 -0
- package/getRepositories.js.map +1 -1
- package/getTeam.d.ts +31 -0
- package/getTeam.js +25 -0
- package/getTeam.js.map +1 -0
- package/getTeams.d.ts +27 -0
- package/getTeams.js +25 -0
- package/getTeams.js.map +1 -0
- package/getUsers.d.ts +22 -0
- package/getUsers.js +5 -0
- package/getUsers.js.map +1 -1
- package/git.d.ts +24 -0
- package/git.js +25 -0
- package/git.js.map +1 -1
- package/gitPermissions.d.ts +3 -3
- package/gitPermissions.js +4 -3
- package/gitPermissions.js.map +1 -1
- package/group.d.ts +2 -2
- package/group.js +3 -2
- package/group.js.map +1 -1
- package/groupMembership.d.ts +1 -1
- package/groupMembership.js +2 -1
- package/groupMembership.js.map +1 -1
- package/identities/getGroup.d.ts +14 -0
- package/identities/getGroup.js +5 -0
- package/identities/getGroup.js.map +1 -1
- package/identities/getUsers.d.ts +22 -0
- package/identities/getUsers.js +5 -0
- package/identities/getUsers.js.map +1 -1
- package/identities/group.d.ts +2 -2
- package/identities/group.js +3 -2
- package/identities/group.js.map +1 -1
- package/identities/groupMembership.d.ts +1 -1
- package/identities/groupMembership.js +2 -1
- package/identities/groupMembership.js.map +1 -1
- package/identities/index.js +14 -7
- package/identities/index.js.map +1 -1
- package/index.d.ts +12 -0
- package/index.js +117 -57
- package/index.js.map +1 -1
- package/iterativePermissions.js +1 -0
- package/iterativePermissions.js.map +1 -1
- package/package.json +4 -3
- package/package.json.bak +3 -2
- package/package.json.dev +4 -3
- package/pipeline/index.js +11 -4
- package/pipeline/index.js.map +1 -1
- package/pipeline/variableGroup.d.ts +5 -0
- package/pipeline/variableGroup.js +6 -0
- package/pipeline/variableGroup.js.map +1 -1
- package/policy/branchPolicyBuildValidation.js +1 -0
- package/policy/branchPolicyBuildValidation.js.map +1 -1
- package/policy/branchPolicyMinReviewers.js +1 -0
- package/policy/branchPolicyMinReviewers.js.map +1 -1
- package/policy/index.js +12 -5
- package/policy/index.js.map +1 -1
- package/pool.js +1 -0
- package/pool.js.map +1 -1
- package/project.js +1 -0
- package/project.js.map +1 -1
- package/projectFeatures.js +1 -0
- package/projectFeatures.js.map +1 -1
- package/projectPermissions.d.ts +1 -1
- package/projectPermissions.js +2 -1
- package/projectPermissions.js.map +1 -1
- package/provider.js +2 -1
- package/provider.js.map +1 -1
- package/queue.js +1 -0
- package/queue.js.map +1 -1
- package/repository/getRepositories.d.ts +15 -0
- package/repository/getRepositories.js +5 -0
- package/repository/getRepositories.js.map +1 -1
- package/repository/git.d.ts +24 -0
- package/repository/git.js +25 -0
- package/repository/git.js.map +1 -1
- package/repository/index.js +12 -5
- package/repository/index.js.map +1 -1
- package/repositoryPolicyAuthorEmailPattern.d.ts +43 -16
- package/repositoryPolicyAuthorEmailPattern.js +30 -14
- package/repositoryPolicyAuthorEmailPattern.js.map +1 -1
- package/repositoryPolicyCaseEnforcement.d.ts +152 -0
- package/repositoryPolicyCaseEnforcement.js +121 -0
- package/repositoryPolicyCaseEnforcement.js.map +1 -0
- package/repositoryPolicyCheckCredentials.d.ts +138 -0
- package/repositoryPolicyCheckCredentials.js +114 -0
- package/repositoryPolicyCheckCredentials.js.map +1 -0
- package/repositoryPolicyFilePathPattern.d.ts +39 -16
- package/repositoryPolicyFilePathPattern.js +29 -14
- package/repositoryPolicyFilePathPattern.js.map +1 -1
- package/repositoryPolicyMaxFileSize.d.ts +152 -0
- package/repositoryPolicyMaxFileSize.js +121 -0
- package/repositoryPolicyMaxFileSize.js.map +1 -0
- package/repositoryPolicyMaxPathLength.d.ts +152 -0
- package/repositoryPolicyMaxPathLength.js +121 -0
- package/repositoryPolicyMaxPathLength.js.map +1 -0
- package/repositoryPolicyReservedNames.d.ts +138 -0
- package/repositoryPolicyReservedNames.js +114 -0
- package/repositoryPolicyReservedNames.js.map +1 -0
- package/resourceAuthorization.js +1 -0
- package/resourceAuthorization.js.map +1 -1
- package/security/index.js +11 -4
- package/security/index.js.map +1 -1
- package/security/resourceAuthorization.js +1 -0
- package/security/resourceAuthorization.js.map +1 -1
- package/serviceEndpointArtifactory.js +1 -0
- package/serviceEndpointArtifactory.js.map +1 -1
- package/serviceEndpointAws.js +1 -0
- package/serviceEndpointAws.js.map +1 -1
- package/serviceEndpointAzureDevOps.js +1 -0
- package/serviceEndpointAzureDevOps.js.map +1 -1
- package/serviceEndpointAzureEcr.d.ts +0 -9
- package/serviceEndpointAzureEcr.js +1 -0
- package/serviceEndpointAzureEcr.js.map +1 -1
- package/serviceEndpointAzureRM.js +1 -0
- package/serviceEndpointAzureRM.js.map +1 -1
- package/serviceEndpointBitBucket.js +1 -0
- package/serviceEndpointBitBucket.js.map +1 -1
- package/serviceEndpointDockerRegistry.d.ts +0 -9
- package/serviceEndpointDockerRegistry.js +1 -0
- package/serviceEndpointDockerRegistry.js.map +1 -1
- package/serviceEndpointGeneric.d.ts +152 -0
- package/serviceEndpointGeneric.js +110 -0
- package/serviceEndpointGeneric.js.map +1 -0
- package/serviceEndpointGenericGit.d.ts +164 -0
- package/serviceEndpointGenericGit.js +112 -0
- package/serviceEndpointGenericGit.js.map +1 -0
- package/serviceEndpointGitHub.js +1 -0
- package/serviceEndpointGitHub.js.map +1 -1
- package/serviceEndpointGitHubEnterprise.js +1 -0
- package/serviceEndpointGitHubEnterprise.js.map +1 -1
- package/serviceEndpointKubernetes.d.ts +3 -3
- package/serviceEndpointKubernetes.js +1 -0
- package/serviceEndpointKubernetes.js.map +1 -1
- package/serviceEndpointNpm.js +1 -0
- package/serviceEndpointNpm.js.map +1 -1
- package/serviceEndpointPipeline.js +1 -0
- package/serviceEndpointPipeline.js.map +1 -1
- package/serviceEndpointServiceFabric.d.ts +25 -0
- package/serviceEndpointServiceFabric.js +26 -0
- package/serviceEndpointServiceFabric.js.map +1 -1
- package/serviceEndpointSonarQube.js +1 -0
- package/serviceEndpointSonarQube.js.map +1 -1
- package/serviceEndpointSsh.js +1 -0
- package/serviceEndpointSsh.js.map +1 -1
- package/serviceendpoint/azureRM.js +1 -0
- package/serviceendpoint/azureRM.js.map +1 -1
- package/serviceendpoint/bitBucket.js +1 -0
- package/serviceendpoint/bitBucket.js.map +1 -1
- package/serviceendpoint/dockerRegistry.d.ts +0 -9
- package/serviceendpoint/dockerRegistry.js +1 -0
- package/serviceendpoint/dockerRegistry.js.map +1 -1
- package/serviceendpoint/gitHub.js +1 -0
- package/serviceendpoint/gitHub.js.map +1 -1
- package/serviceendpoint/index.js +15 -8
- package/serviceendpoint/index.js.map +1 -1
- package/serviceendpoint/kubernetes.d.ts +3 -3
- package/serviceendpoint/kubernetes.js +1 -0
- package/serviceendpoint/kubernetes.js.map +1 -1
- package/team.d.ts +141 -0
- package/team.js +107 -0
- package/team.js.map +1 -0
- package/teamAdministrators.d.ts +129 -0
- package/teamAdministrators.js +105 -0
- package/teamAdministrators.js.map +1 -0
- package/teamMembers.d.ts +129 -0
- package/teamMembers.js +105 -0
- package/teamMembers.js.map +1 -0
- package/types/index.js +1 -0
- package/types/index.js.map +1 -1
- package/types/input.d.ts +10 -37
- package/types/output.d.ts +18 -37
- package/user.js +1 -0
- package/user.js.map +1 -1
- package/utilities.js +1 -0
- package/utilities.js.map +1 -1
- package/variableGroup.d.ts +5 -0
- package/variableGroup.js +6 -0
- package/variableGroup.js.map +1 -1
- package/workItemQueryPermissions.d.ts +2 -2
- package/workItemQueryPermissions.js +3 -2
- package/workItemQueryPermissions.js.map +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
-
import { input as inputs, output as outputs } from "./types";
|
|
3
2
|
/**
|
|
4
3
|
* Manage author email pattern repository policy within Azure DevOps project.
|
|
5
4
|
*
|
|
@@ -25,17 +24,30 @@ import { input as inputs, output as outputs } from "./types";
|
|
|
25
24
|
* projectId: project.id,
|
|
26
25
|
* enabled: true,
|
|
27
26
|
* blocking: true,
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
27
|
+
* authorEmailPatterns: [
|
|
28
|
+
* "user1@test.com",
|
|
29
|
+
* "user2@test.com",
|
|
30
|
+
* ],
|
|
31
|
+
* repositoryIds: [git.id],
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
* ## Set project level repository policy
|
|
35
|
+
*
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
38
|
+
* import * as azuredevops from "@pulumi/azuredevops";
|
|
39
|
+
*
|
|
40
|
+
* const repositoryPolicyAuthorEmailPattern = new azuredevops.RepositoryPolicyAuthorEmailPattern("repositoryPolicyAuthorEmailPattern", {
|
|
41
|
+
* projectId: azuredevops_project.p.id,
|
|
42
|
+
* enabled: true,
|
|
43
|
+
* blocking: true,
|
|
44
|
+
* authorEmailPatterns: [
|
|
45
|
+
* "user1@test.com",
|
|
46
|
+
* "user2@test.com",
|
|
47
|
+
* ],
|
|
37
48
|
* });
|
|
38
49
|
* ```
|
|
50
|
+
*
|
|
39
51
|
* ## Relevant Links
|
|
40
52
|
*
|
|
41
53
|
* - [Azure DevOps Service REST API 5.1 - Policy Configurations](https://docs.microsoft.com/en-us/rest/api/azure/devops/policy/configurations/create?view=azure-devops-rest-5.1)
|
|
@@ -64,6 +76,11 @@ export declare class RepositoryPolicyAuthorEmailPattern extends pulumi.CustomRes
|
|
|
64
76
|
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
65
77
|
*/
|
|
66
78
|
static isInstance(obj: any): obj is RepositoryPolicyAuthorEmailPattern;
|
|
79
|
+
/**
|
|
80
|
+
* Block pushes with a commit author email that does not match the patterns. You can specify exact emails or use wildcards.
|
|
81
|
+
* Email patterns prefixed with "!" are excluded. Order is important.
|
|
82
|
+
*/
|
|
83
|
+
readonly authorEmailPatterns: pulumi.Output<string[]>;
|
|
67
84
|
/**
|
|
68
85
|
* A flag indicating if the policy should be blocking. Defaults to `true`.
|
|
69
86
|
*/
|
|
@@ -77,9 +94,9 @@ export declare class RepositoryPolicyAuthorEmailPattern extends pulumi.CustomRes
|
|
|
77
94
|
*/
|
|
78
95
|
readonly projectId: pulumi.Output<string>;
|
|
79
96
|
/**
|
|
80
|
-
*
|
|
97
|
+
* Control whether the policy is enabled for the repository or the project. If `repositoryIds` not configured, the policy will be set to the project.
|
|
81
98
|
*/
|
|
82
|
-
readonly
|
|
99
|
+
readonly repositoryIds: pulumi.Output<string[] | undefined>;
|
|
83
100
|
/**
|
|
84
101
|
* Create a RepositoryPolicyAuthorEmailPattern resource with the given unique name, arguments, and options.
|
|
85
102
|
*
|
|
@@ -93,6 +110,11 @@ export declare class RepositoryPolicyAuthorEmailPattern extends pulumi.CustomRes
|
|
|
93
110
|
* Input properties used for looking up and filtering RepositoryPolicyAuthorEmailPattern resources.
|
|
94
111
|
*/
|
|
95
112
|
export interface RepositoryPolicyAuthorEmailPatternState {
|
|
113
|
+
/**
|
|
114
|
+
* Block pushes with a commit author email that does not match the patterns. You can specify exact emails or use wildcards.
|
|
115
|
+
* Email patterns prefixed with "!" are excluded. Order is important.
|
|
116
|
+
*/
|
|
117
|
+
authorEmailPatterns?: pulumi.Input<pulumi.Input<string>[]>;
|
|
96
118
|
/**
|
|
97
119
|
* A flag indicating if the policy should be blocking. Defaults to `true`.
|
|
98
120
|
*/
|
|
@@ -106,14 +128,19 @@ export interface RepositoryPolicyAuthorEmailPatternState {
|
|
|
106
128
|
*/
|
|
107
129
|
projectId?: pulumi.Input<string>;
|
|
108
130
|
/**
|
|
109
|
-
*
|
|
131
|
+
* Control whether the policy is enabled for the repository or the project. If `repositoryIds` not configured, the policy will be set to the project.
|
|
110
132
|
*/
|
|
111
|
-
|
|
133
|
+
repositoryIds?: pulumi.Input<pulumi.Input<string>[]>;
|
|
112
134
|
}
|
|
113
135
|
/**
|
|
114
136
|
* The set of arguments for constructing a RepositoryPolicyAuthorEmailPattern resource.
|
|
115
137
|
*/
|
|
116
138
|
export interface RepositoryPolicyAuthorEmailPatternArgs {
|
|
139
|
+
/**
|
|
140
|
+
* Block pushes with a commit author email that does not match the patterns. You can specify exact emails or use wildcards.
|
|
141
|
+
* Email patterns prefixed with "!" are excluded. Order is important.
|
|
142
|
+
*/
|
|
143
|
+
authorEmailPatterns: pulumi.Input<pulumi.Input<string>[]>;
|
|
117
144
|
/**
|
|
118
145
|
* A flag indicating if the policy should be blocking. Defaults to `true`.
|
|
119
146
|
*/
|
|
@@ -127,7 +154,7 @@ export interface RepositoryPolicyAuthorEmailPatternArgs {
|
|
|
127
154
|
*/
|
|
128
155
|
projectId: pulumi.Input<string>;
|
|
129
156
|
/**
|
|
130
|
-
*
|
|
157
|
+
* Control whether the policy is enabled for the repository or the project. If `repositoryIds` not configured, the policy will be set to the project.
|
|
131
158
|
*/
|
|
132
|
-
|
|
159
|
+
repositoryIds?: pulumi.Input<pulumi.Input<string>[]>;
|
|
133
160
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
3
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.RepositoryPolicyAuthorEmailPattern = void 0;
|
|
5
6
|
const pulumi = require("@pulumi/pulumi");
|
|
6
7
|
const utilities = require("./utilities");
|
|
7
8
|
/**
|
|
@@ -29,17 +30,30 @@ const utilities = require("./utilities");
|
|
|
29
30
|
* projectId: project.id,
|
|
30
31
|
* enabled: true,
|
|
31
32
|
* blocking: true,
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
33
|
+
* authorEmailPatterns: [
|
|
34
|
+
* "user1@test.com",
|
|
35
|
+
* "user2@test.com",
|
|
36
|
+
* ],
|
|
37
|
+
* repositoryIds: [git.id],
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
* ## Set project level repository policy
|
|
41
|
+
*
|
|
42
|
+
* ```typescript
|
|
43
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
44
|
+
* import * as azuredevops from "@pulumi/azuredevops";
|
|
45
|
+
*
|
|
46
|
+
* const repositoryPolicyAuthorEmailPattern = new azuredevops.RepositoryPolicyAuthorEmailPattern("repositoryPolicyAuthorEmailPattern", {
|
|
47
|
+
* projectId: azuredevops_project.p.id,
|
|
48
|
+
* enabled: true,
|
|
49
|
+
* blocking: true,
|
|
50
|
+
* authorEmailPatterns: [
|
|
51
|
+
* "user1@test.com",
|
|
52
|
+
* "user2@test.com",
|
|
53
|
+
* ],
|
|
41
54
|
* });
|
|
42
55
|
* ```
|
|
56
|
+
*
|
|
43
57
|
* ## Relevant Links
|
|
44
58
|
*
|
|
45
59
|
* - [Azure DevOps Service REST API 5.1 - Policy Configurations](https://docs.microsoft.com/en-us/rest/api/azure/devops/policy/configurations/create?view=azure-devops-rest-5.1)
|
|
@@ -58,23 +72,25 @@ class RepositoryPolicyAuthorEmailPattern extends pulumi.CustomResource {
|
|
|
58
72
|
opts = opts || {};
|
|
59
73
|
if (opts.id) {
|
|
60
74
|
const state = argsOrState;
|
|
75
|
+
inputs["authorEmailPatterns"] = state ? state.authorEmailPatterns : undefined;
|
|
61
76
|
inputs["blocking"] = state ? state.blocking : undefined;
|
|
62
77
|
inputs["enabled"] = state ? state.enabled : undefined;
|
|
63
78
|
inputs["projectId"] = state ? state.projectId : undefined;
|
|
64
|
-
inputs["
|
|
79
|
+
inputs["repositoryIds"] = state ? state.repositoryIds : undefined;
|
|
65
80
|
}
|
|
66
81
|
else {
|
|
67
82
|
const args = argsOrState;
|
|
83
|
+
if ((!args || args.authorEmailPatterns === undefined) && !opts.urn) {
|
|
84
|
+
throw new Error("Missing required property 'authorEmailPatterns'");
|
|
85
|
+
}
|
|
68
86
|
if ((!args || args.projectId === undefined) && !opts.urn) {
|
|
69
87
|
throw new Error("Missing required property 'projectId'");
|
|
70
88
|
}
|
|
71
|
-
|
|
72
|
-
throw new Error("Missing required property 'settings'");
|
|
73
|
-
}
|
|
89
|
+
inputs["authorEmailPatterns"] = args ? args.authorEmailPatterns : undefined;
|
|
74
90
|
inputs["blocking"] = args ? args.blocking : undefined;
|
|
75
91
|
inputs["enabled"] = args ? args.enabled : undefined;
|
|
76
92
|
inputs["projectId"] = args ? args.projectId : undefined;
|
|
77
|
-
inputs["
|
|
93
|
+
inputs["repositoryIds"] = args ? args.repositoryIds : undefined;
|
|
78
94
|
}
|
|
79
95
|
if (!opts.version) {
|
|
80
96
|
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repositoryPolicyAuthorEmailPattern.js","sourceRoot":"","sources":["../repositoryPolicyAuthorEmailPattern.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF
|
|
1
|
+
{"version":3,"file":"repositoryPolicyAuthorEmailPattern.js","sourceRoot":"","sources":["../repositoryPolicyAuthorEmailPattern.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Manages a case enforcement repository policy within Azure DevOps project.
|
|
4
|
+
*
|
|
5
|
+
* > If both project and project policy are enabled, the project policy has high priority.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as azuredevops from "@pulumi/azuredevops";
|
|
12
|
+
*
|
|
13
|
+
* const project = new azuredevops.Project("project", {
|
|
14
|
+
* description: "Managed by Terraform",
|
|
15
|
+
* visibility: "private",
|
|
16
|
+
* versionControl: "Git",
|
|
17
|
+
* workItemTemplate: "Agile",
|
|
18
|
+
* });
|
|
19
|
+
* const git = new azuredevops.Git("git", {
|
|
20
|
+
* projectId: project.id,
|
|
21
|
+
* initialization: {
|
|
22
|
+
* initType: "Clean",
|
|
23
|
+
* },
|
|
24
|
+
* });
|
|
25
|
+
* const repositoryPolicyCaseEnforcement = new azuredevops.RepositoryPolicyCaseEnforcement("repositoryPolicyCaseEnforcement", {
|
|
26
|
+
* projectId: project.id,
|
|
27
|
+
* enabled: true,
|
|
28
|
+
* blocking: true,
|
|
29
|
+
* enforceConsistentCase: true,
|
|
30
|
+
* repositoryIds: [git.id],
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* # Set project level repository policy
|
|
35
|
+
* ```typescript
|
|
36
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
37
|
+
* import * as azuredevops from "@pulumi/azuredevops";
|
|
38
|
+
*
|
|
39
|
+
* const repositoryPolicyCaseEnforcement = new azuredevops.RepositoryPolicyCaseEnforcement("repositoryPolicyCaseEnforcement", {
|
|
40
|
+
* projectId: azuredevops_project.p.id,
|
|
41
|
+
* enabled: true,
|
|
42
|
+
* blocking: true,
|
|
43
|
+
* enforceConsistentCase: true,
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
* ## Relevant Links
|
|
47
|
+
*
|
|
48
|
+
* - [Azure DevOps Service REST API 5.1 - Policy Configurations](https://docs.microsoft.com/en-us/rest/api/azure/devops/policy/configurations/create?view=azure-devops-rest-5.1)
|
|
49
|
+
*
|
|
50
|
+
* ## Import
|
|
51
|
+
*
|
|
52
|
+
* Azure DevOps repository policies can be imported using the projectID/policyID or projectName/policyID
|
|
53
|
+
*
|
|
54
|
+
* ```sh
|
|
55
|
+
* $ pulumi import azuredevops:index/repositoryPolicyCaseEnforcement:RepositoryPolicyCaseEnforcement p 00000000-0000-0000-0000-000000000000/0
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare class RepositoryPolicyCaseEnforcement extends pulumi.CustomResource {
|
|
59
|
+
/**
|
|
60
|
+
* Get an existing RepositoryPolicyCaseEnforcement resource's state with the given name, ID, and optional extra
|
|
61
|
+
* properties used to qualify the lookup.
|
|
62
|
+
*
|
|
63
|
+
* @param name The _unique_ name of the resulting resource.
|
|
64
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
65
|
+
* @param state Any extra arguments used during the lookup.
|
|
66
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
67
|
+
*/
|
|
68
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryPolicyCaseEnforcementState, opts?: pulumi.CustomResourceOptions): RepositoryPolicyCaseEnforcement;
|
|
69
|
+
/**
|
|
70
|
+
* Returns true if the given object is an instance of RepositoryPolicyCaseEnforcement. This is designed to work even
|
|
71
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
72
|
+
*/
|
|
73
|
+
static isInstance(obj: any): obj is RepositoryPolicyCaseEnforcement;
|
|
74
|
+
/**
|
|
75
|
+
* A flag indicating if the policy should be blocking. Defaults to `true`.
|
|
76
|
+
*/
|
|
77
|
+
readonly blocking: pulumi.Output<boolean | undefined>;
|
|
78
|
+
/**
|
|
79
|
+
* A flag indicating if the policy should be enabled. Defaults to `true`.
|
|
80
|
+
*/
|
|
81
|
+
readonly enabled: pulumi.Output<boolean | undefined>;
|
|
82
|
+
/**
|
|
83
|
+
* Avoid case-sensitivity conflicts by blocking pushes that change name casing on files, folders, branches, and tags.
|
|
84
|
+
*/
|
|
85
|
+
readonly enforceConsistentCase: pulumi.Output<boolean>;
|
|
86
|
+
/**
|
|
87
|
+
* The ID of the project in which the policy will be created.
|
|
88
|
+
*/
|
|
89
|
+
readonly projectId: pulumi.Output<string>;
|
|
90
|
+
/**
|
|
91
|
+
* Control whether the policy is enabled for the repository or the project. If `repositoryIds` not configured, the policy will be set to the project.
|
|
92
|
+
*/
|
|
93
|
+
readonly repositoryIds: pulumi.Output<string[] | undefined>;
|
|
94
|
+
/**
|
|
95
|
+
* Create a RepositoryPolicyCaseEnforcement resource with the given unique name, arguments, and options.
|
|
96
|
+
*
|
|
97
|
+
* @param name The _unique_ name of the resource.
|
|
98
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
99
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
100
|
+
*/
|
|
101
|
+
constructor(name: string, args: RepositoryPolicyCaseEnforcementArgs, opts?: pulumi.CustomResourceOptions);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Input properties used for looking up and filtering RepositoryPolicyCaseEnforcement resources.
|
|
105
|
+
*/
|
|
106
|
+
export interface RepositoryPolicyCaseEnforcementState {
|
|
107
|
+
/**
|
|
108
|
+
* A flag indicating if the policy should be blocking. Defaults to `true`.
|
|
109
|
+
*/
|
|
110
|
+
blocking?: pulumi.Input<boolean>;
|
|
111
|
+
/**
|
|
112
|
+
* A flag indicating if the policy should be enabled. Defaults to `true`.
|
|
113
|
+
*/
|
|
114
|
+
enabled?: pulumi.Input<boolean>;
|
|
115
|
+
/**
|
|
116
|
+
* Avoid case-sensitivity conflicts by blocking pushes that change name casing on files, folders, branches, and tags.
|
|
117
|
+
*/
|
|
118
|
+
enforceConsistentCase?: pulumi.Input<boolean>;
|
|
119
|
+
/**
|
|
120
|
+
* The ID of the project in which the policy will be created.
|
|
121
|
+
*/
|
|
122
|
+
projectId?: pulumi.Input<string>;
|
|
123
|
+
/**
|
|
124
|
+
* Control whether the policy is enabled for the repository or the project. If `repositoryIds` not configured, the policy will be set to the project.
|
|
125
|
+
*/
|
|
126
|
+
repositoryIds?: pulumi.Input<pulumi.Input<string>[]>;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The set of arguments for constructing a RepositoryPolicyCaseEnforcement resource.
|
|
130
|
+
*/
|
|
131
|
+
export interface RepositoryPolicyCaseEnforcementArgs {
|
|
132
|
+
/**
|
|
133
|
+
* A flag indicating if the policy should be blocking. Defaults to `true`.
|
|
134
|
+
*/
|
|
135
|
+
blocking?: pulumi.Input<boolean>;
|
|
136
|
+
/**
|
|
137
|
+
* A flag indicating if the policy should be enabled. Defaults to `true`.
|
|
138
|
+
*/
|
|
139
|
+
enabled?: pulumi.Input<boolean>;
|
|
140
|
+
/**
|
|
141
|
+
* Avoid case-sensitivity conflicts by blocking pushes that change name casing on files, folders, branches, and tags.
|
|
142
|
+
*/
|
|
143
|
+
enforceConsistentCase: pulumi.Input<boolean>;
|
|
144
|
+
/**
|
|
145
|
+
* The ID of the project in which the policy will be created.
|
|
146
|
+
*/
|
|
147
|
+
projectId: pulumi.Input<string>;
|
|
148
|
+
/**
|
|
149
|
+
* Control whether the policy is enabled for the repository or the project. If `repositoryIds` not configured, the policy will be set to the project.
|
|
150
|
+
*/
|
|
151
|
+
repositoryIds?: pulumi.Input<pulumi.Input<string>[]>;
|
|
152
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.RepositoryPolicyCaseEnforcement = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Manages a case enforcement repository policy within Azure DevOps project.
|
|
10
|
+
*
|
|
11
|
+
* > If both project and project policy are enabled, the project policy has high priority.
|
|
12
|
+
*
|
|
13
|
+
* ## Example Usage
|
|
14
|
+
*
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
17
|
+
* import * as azuredevops from "@pulumi/azuredevops";
|
|
18
|
+
*
|
|
19
|
+
* const project = new azuredevops.Project("project", {
|
|
20
|
+
* description: "Managed by Terraform",
|
|
21
|
+
* visibility: "private",
|
|
22
|
+
* versionControl: "Git",
|
|
23
|
+
* workItemTemplate: "Agile",
|
|
24
|
+
* });
|
|
25
|
+
* const git = new azuredevops.Git("git", {
|
|
26
|
+
* projectId: project.id,
|
|
27
|
+
* initialization: {
|
|
28
|
+
* initType: "Clean",
|
|
29
|
+
* },
|
|
30
|
+
* });
|
|
31
|
+
* const repositoryPolicyCaseEnforcement = new azuredevops.RepositoryPolicyCaseEnforcement("repositoryPolicyCaseEnforcement", {
|
|
32
|
+
* projectId: project.id,
|
|
33
|
+
* enabled: true,
|
|
34
|
+
* blocking: true,
|
|
35
|
+
* enforceConsistentCase: true,
|
|
36
|
+
* repositoryIds: [git.id],
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* # Set project level repository policy
|
|
41
|
+
* ```typescript
|
|
42
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
43
|
+
* import * as azuredevops from "@pulumi/azuredevops";
|
|
44
|
+
*
|
|
45
|
+
* const repositoryPolicyCaseEnforcement = new azuredevops.RepositoryPolicyCaseEnforcement("repositoryPolicyCaseEnforcement", {
|
|
46
|
+
* projectId: azuredevops_project.p.id,
|
|
47
|
+
* enabled: true,
|
|
48
|
+
* blocking: true,
|
|
49
|
+
* enforceConsistentCase: true,
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
* ## Relevant Links
|
|
53
|
+
*
|
|
54
|
+
* - [Azure DevOps Service REST API 5.1 - Policy Configurations](https://docs.microsoft.com/en-us/rest/api/azure/devops/policy/configurations/create?view=azure-devops-rest-5.1)
|
|
55
|
+
*
|
|
56
|
+
* ## Import
|
|
57
|
+
*
|
|
58
|
+
* Azure DevOps repository policies can be imported using the projectID/policyID or projectName/policyID
|
|
59
|
+
*
|
|
60
|
+
* ```sh
|
|
61
|
+
* $ pulumi import azuredevops:index/repositoryPolicyCaseEnforcement:RepositoryPolicyCaseEnforcement p 00000000-0000-0000-0000-000000000000/0
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
class RepositoryPolicyCaseEnforcement extends pulumi.CustomResource {
|
|
65
|
+
constructor(name, argsOrState, opts) {
|
|
66
|
+
let inputs = {};
|
|
67
|
+
opts = opts || {};
|
|
68
|
+
if (opts.id) {
|
|
69
|
+
const state = argsOrState;
|
|
70
|
+
inputs["blocking"] = state ? state.blocking : undefined;
|
|
71
|
+
inputs["enabled"] = state ? state.enabled : undefined;
|
|
72
|
+
inputs["enforceConsistentCase"] = state ? state.enforceConsistentCase : undefined;
|
|
73
|
+
inputs["projectId"] = state ? state.projectId : undefined;
|
|
74
|
+
inputs["repositoryIds"] = state ? state.repositoryIds : undefined;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
const args = argsOrState;
|
|
78
|
+
if ((!args || args.enforceConsistentCase === undefined) && !opts.urn) {
|
|
79
|
+
throw new Error("Missing required property 'enforceConsistentCase'");
|
|
80
|
+
}
|
|
81
|
+
if ((!args || args.projectId === undefined) && !opts.urn) {
|
|
82
|
+
throw new Error("Missing required property 'projectId'");
|
|
83
|
+
}
|
|
84
|
+
inputs["blocking"] = args ? args.blocking : undefined;
|
|
85
|
+
inputs["enabled"] = args ? args.enabled : undefined;
|
|
86
|
+
inputs["enforceConsistentCase"] = args ? args.enforceConsistentCase : undefined;
|
|
87
|
+
inputs["projectId"] = args ? args.projectId : undefined;
|
|
88
|
+
inputs["repositoryIds"] = args ? args.repositoryIds : undefined;
|
|
89
|
+
}
|
|
90
|
+
if (!opts.version) {
|
|
91
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
|
|
92
|
+
}
|
|
93
|
+
super(RepositoryPolicyCaseEnforcement.__pulumiType, name, inputs, opts);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Get an existing RepositoryPolicyCaseEnforcement resource's state with the given name, ID, and optional extra
|
|
97
|
+
* properties used to qualify the lookup.
|
|
98
|
+
*
|
|
99
|
+
* @param name The _unique_ name of the resulting resource.
|
|
100
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
101
|
+
* @param state Any extra arguments used during the lookup.
|
|
102
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
103
|
+
*/
|
|
104
|
+
static get(name, id, state, opts) {
|
|
105
|
+
return new RepositoryPolicyCaseEnforcement(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Returns true if the given object is an instance of RepositoryPolicyCaseEnforcement. This is designed to work even
|
|
109
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
110
|
+
*/
|
|
111
|
+
static isInstance(obj) {
|
|
112
|
+
if (obj === undefined || obj === null) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
return obj['__pulumiType'] === RepositoryPolicyCaseEnforcement.__pulumiType;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.RepositoryPolicyCaseEnforcement = RepositoryPolicyCaseEnforcement;
|
|
119
|
+
/** @internal */
|
|
120
|
+
RepositoryPolicyCaseEnforcement.__pulumiType = 'azuredevops:index/repositoryPolicyCaseEnforcement:RepositoryPolicyCaseEnforcement';
|
|
121
|
+
//# sourceMappingURL=repositoryPolicyCaseEnforcement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repositoryPolicyCaseEnforcement.js","sourceRoot":"","sources":["../repositoryPolicyCaseEnforcement.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Manage a credentials check repository policy within Azure DevOps project. Block pushes that introduce files, folders, or branch names that include platform reserved names or incompatible characters.
|
|
4
|
+
*
|
|
5
|
+
* > If both project and project policy are enabled, the project policy has high priority.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as azuredevops from "@pulumi/azuredevops";
|
|
12
|
+
*
|
|
13
|
+
* const project = new azuredevops.Project("project", {
|
|
14
|
+
* description: "Managed by Terraform",
|
|
15
|
+
* visibility: "private",
|
|
16
|
+
* versionControl: "Git",
|
|
17
|
+
* workItemTemplate: "Agile",
|
|
18
|
+
* });
|
|
19
|
+
* const git = new azuredevops.Git("git", {
|
|
20
|
+
* projectId: project.id,
|
|
21
|
+
* initialization: {
|
|
22
|
+
* initType: "Clean",
|
|
23
|
+
* },
|
|
24
|
+
* });
|
|
25
|
+
* const repositoryPolicyCheckCredentials = new azuredevops.RepositoryPolicyCheckCredentials("repositoryPolicyCheckCredentials", {
|
|
26
|
+
* projectId: project.id,
|
|
27
|
+
* enabled: true,
|
|
28
|
+
* blocking: true,
|
|
29
|
+
* repositoryIds: [git.id],
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* # Set project level repository policy
|
|
34
|
+
* ```typescript
|
|
35
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
36
|
+
* import * as azuredevops from "@pulumi/azuredevops";
|
|
37
|
+
*
|
|
38
|
+
* const repositoryPolicyCheckCredentials = new azuredevops.RepositoryPolicyCheckCredentials("repositoryPolicyCheckCredentials", {
|
|
39
|
+
* projectId: azuredevops_project.p.id,
|
|
40
|
+
* enabled: true,
|
|
41
|
+
* blocking: true,
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
* ## Relevant Links
|
|
45
|
+
*
|
|
46
|
+
* - [Azure DevOps Service REST API 5.1 - Policy Configurations](https://docs.microsoft.com/en-us/rest/api/azure/devops/policy/configurations/create?view=azure-devops-rest-5.1)
|
|
47
|
+
*
|
|
48
|
+
* ## Import
|
|
49
|
+
*
|
|
50
|
+
* Azure DevOps repository policies can be imported using the projectID/policyID or projectName/policyID
|
|
51
|
+
*
|
|
52
|
+
* ```sh
|
|
53
|
+
* $ pulumi import azuredevops:index/repositoryPolicyCheckCredentials:RepositoryPolicyCheckCredentials p 00000000-0000-0000-0000-000000000000/0
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare class RepositoryPolicyCheckCredentials extends pulumi.CustomResource {
|
|
57
|
+
/**
|
|
58
|
+
* Get an existing RepositoryPolicyCheckCredentials resource's state with the given name, ID, and optional extra
|
|
59
|
+
* properties used to qualify the lookup.
|
|
60
|
+
*
|
|
61
|
+
* @param name The _unique_ name of the resulting resource.
|
|
62
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
63
|
+
* @param state Any extra arguments used during the lookup.
|
|
64
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
65
|
+
*/
|
|
66
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryPolicyCheckCredentialsState, opts?: pulumi.CustomResourceOptions): RepositoryPolicyCheckCredentials;
|
|
67
|
+
/**
|
|
68
|
+
* Returns true if the given object is an instance of RepositoryPolicyCheckCredentials. This is designed to work even
|
|
69
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
70
|
+
*/
|
|
71
|
+
static isInstance(obj: any): obj is RepositoryPolicyCheckCredentials;
|
|
72
|
+
/**
|
|
73
|
+
* A flag indicating if the policy should be blocking. Defaults to `true`.
|
|
74
|
+
*/
|
|
75
|
+
readonly blocking: pulumi.Output<boolean | undefined>;
|
|
76
|
+
/**
|
|
77
|
+
* A flag indicating if the policy should be enabled. Defaults to `true`.
|
|
78
|
+
*/
|
|
79
|
+
readonly enabled: pulumi.Output<boolean | undefined>;
|
|
80
|
+
/**
|
|
81
|
+
* The ID of the project in which the policy will be created.
|
|
82
|
+
*/
|
|
83
|
+
readonly projectId: pulumi.Output<string>;
|
|
84
|
+
/**
|
|
85
|
+
* Control whether the policy is enabled for the repository or the project. If `repositoryIds` not configured, the policy will be set to the project.
|
|
86
|
+
*/
|
|
87
|
+
readonly repositoryIds: pulumi.Output<string[] | undefined>;
|
|
88
|
+
/**
|
|
89
|
+
* Create a RepositoryPolicyCheckCredentials resource with the given unique name, arguments, and options.
|
|
90
|
+
*
|
|
91
|
+
* @param name The _unique_ name of the resource.
|
|
92
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
93
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
94
|
+
*/
|
|
95
|
+
constructor(name: string, args: RepositoryPolicyCheckCredentialsArgs, opts?: pulumi.CustomResourceOptions);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Input properties used for looking up and filtering RepositoryPolicyCheckCredentials resources.
|
|
99
|
+
*/
|
|
100
|
+
export interface RepositoryPolicyCheckCredentialsState {
|
|
101
|
+
/**
|
|
102
|
+
* A flag indicating if the policy should be blocking. Defaults to `true`.
|
|
103
|
+
*/
|
|
104
|
+
blocking?: pulumi.Input<boolean>;
|
|
105
|
+
/**
|
|
106
|
+
* A flag indicating if the policy should be enabled. Defaults to `true`.
|
|
107
|
+
*/
|
|
108
|
+
enabled?: pulumi.Input<boolean>;
|
|
109
|
+
/**
|
|
110
|
+
* The ID of the project in which the policy will be created.
|
|
111
|
+
*/
|
|
112
|
+
projectId?: pulumi.Input<string>;
|
|
113
|
+
/**
|
|
114
|
+
* Control whether the policy is enabled for the repository or the project. If `repositoryIds` not configured, the policy will be set to the project.
|
|
115
|
+
*/
|
|
116
|
+
repositoryIds?: pulumi.Input<pulumi.Input<string>[]>;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The set of arguments for constructing a RepositoryPolicyCheckCredentials resource.
|
|
120
|
+
*/
|
|
121
|
+
export interface RepositoryPolicyCheckCredentialsArgs {
|
|
122
|
+
/**
|
|
123
|
+
* A flag indicating if the policy should be blocking. Defaults to `true`.
|
|
124
|
+
*/
|
|
125
|
+
blocking?: pulumi.Input<boolean>;
|
|
126
|
+
/**
|
|
127
|
+
* A flag indicating if the policy should be enabled. Defaults to `true`.
|
|
128
|
+
*/
|
|
129
|
+
enabled?: pulumi.Input<boolean>;
|
|
130
|
+
/**
|
|
131
|
+
* The ID of the project in which the policy will be created.
|
|
132
|
+
*/
|
|
133
|
+
projectId: pulumi.Input<string>;
|
|
134
|
+
/**
|
|
135
|
+
* Control whether the policy is enabled for the repository or the project. If `repositoryIds` not configured, the policy will be set to the project.
|
|
136
|
+
*/
|
|
137
|
+
repositoryIds?: pulumi.Input<pulumi.Input<string>[]>;
|
|
138
|
+
}
|