@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.
Files changed (274) hide show
  1. package/README.md +1 -1
  2. package/agent/getPool.d.ts +10 -0
  3. package/agent/getPool.js +5 -0
  4. package/agent/getPool.js.map +1 -1
  5. package/agent/getPools.d.ts +3 -3
  6. package/agent/getPools.js +4 -3
  7. package/agent/getPools.js.map +1 -1
  8. package/agent/index.js +14 -7
  9. package/agent/index.js.map +1 -1
  10. package/agent/pool.js +1 -0
  11. package/agent/pool.js.map +1 -1
  12. package/agent/queue.js +1 -0
  13. package/agent/queue.js.map +1 -1
  14. package/areaPermissions.d.ts +1 -1
  15. package/areaPermissions.js +2 -1
  16. package/areaPermissions.js.map +1 -1
  17. package/branchPolicyAutoReviewers.d.ts +3 -3
  18. package/branchPolicyAutoReviewers.js +1 -0
  19. package/branchPolicyAutoReviewers.js.map +1 -1
  20. package/branchPolicyBuildValidation.js +1 -0
  21. package/branchPolicyBuildValidation.js.map +1 -1
  22. package/branchPolicyCommentResolution.js +1 -0
  23. package/branchPolicyCommentResolution.js.map +1 -1
  24. package/branchPolicyMergeTypes.js +1 -0
  25. package/branchPolicyMergeTypes.js.map +1 -1
  26. package/branchPolicyMinReviewers.js +1 -0
  27. package/branchPolicyMinReviewers.js.map +1 -1
  28. package/branchPolicyStatusCheck.js +1 -0
  29. package/branchPolicyStatusCheck.js.map +1 -1
  30. package/branchPolicyWorkItemLinking.js +1 -0
  31. package/branchPolicyWorkItemLinking.js.map +1 -1
  32. package/build/buildDefinition.js +1 -0
  33. package/build/buildDefinition.js.map +1 -1
  34. package/build/index.js +11 -4
  35. package/build/index.js.map +1 -1
  36. package/buildDefinition.js +1 -0
  37. package/buildDefinition.js.map +1 -1
  38. package/buildDefinitionPermissions.d.ts +1 -1
  39. package/buildDefinitionPermissions.js +2 -1
  40. package/buildDefinitionPermissions.js.map +1 -1
  41. package/config/index.js +11 -4
  42. package/config/index.js.map +1 -1
  43. package/config/vars.d.ts +2 -2
  44. package/config/vars.js +14 -9
  45. package/config/vars.js.map +1 -1
  46. package/core/getClientConfig.js +1 -0
  47. package/core/getClientConfig.js.map +1 -1
  48. package/core/getProject.d.ts +14 -0
  49. package/core/getProject.js +5 -0
  50. package/core/getProject.js.map +1 -1
  51. package/core/getProjects.d.ts +18 -4
  52. package/core/getProjects.js +9 -4
  53. package/core/getProjects.js.map +1 -1
  54. package/core/index.js +15 -8
  55. package/core/index.js.map +1 -1
  56. package/core/project.js +1 -0
  57. package/core/project.js.map +1 -1
  58. package/core/projectFeatures.js +1 -0
  59. package/core/projectFeatures.js.map +1 -1
  60. package/entitlement/index.js +11 -4
  61. package/entitlement/index.js.map +1 -1
  62. package/entitlement/user.js +1 -0
  63. package/entitlement/user.js.map +1 -1
  64. package/getAgentQueue.d.ts +16 -2
  65. package/getAgentQueue.js +7 -2
  66. package/getAgentQueue.js.map +1 -1
  67. package/getArea.d.ts +18 -0
  68. package/getArea.js +5 -0
  69. package/getArea.js.map +1 -1
  70. package/getClientConfig.js +1 -0
  71. package/getClientConfig.js.map +1 -1
  72. package/getGitRepository.d.ts +14 -0
  73. package/getGitRepository.js +5 -0
  74. package/getGitRepository.js.map +1 -1
  75. package/getGroup.d.ts +14 -0
  76. package/getGroup.js +5 -0
  77. package/getGroup.js.map +1 -1
  78. package/getIteration.d.ts +18 -0
  79. package/getIteration.js +5 -0
  80. package/getIteration.js.map +1 -1
  81. package/getPool.d.ts +10 -0
  82. package/getPool.js +5 -0
  83. package/getPool.js.map +1 -1
  84. package/getPools.d.ts +3 -3
  85. package/getPools.js +4 -3
  86. package/getPools.js.map +1 -1
  87. package/getProject.d.ts +14 -0
  88. package/getProject.js +5 -0
  89. package/getProject.js.map +1 -1
  90. package/getProjects.d.ts +18 -4
  91. package/getProjects.js +9 -4
  92. package/getProjects.js.map +1 -1
  93. package/getRepositories.d.ts +15 -0
  94. package/getRepositories.js +5 -0
  95. package/getRepositories.js.map +1 -1
  96. package/getTeam.d.ts +31 -0
  97. package/getTeam.js +25 -0
  98. package/getTeam.js.map +1 -0
  99. package/getTeams.d.ts +27 -0
  100. package/getTeams.js +25 -0
  101. package/getTeams.js.map +1 -0
  102. package/getUsers.d.ts +22 -0
  103. package/getUsers.js +5 -0
  104. package/getUsers.js.map +1 -1
  105. package/git.d.ts +24 -0
  106. package/git.js +25 -0
  107. package/git.js.map +1 -1
  108. package/gitPermissions.d.ts +3 -3
  109. package/gitPermissions.js +4 -3
  110. package/gitPermissions.js.map +1 -1
  111. package/group.d.ts +2 -2
  112. package/group.js +3 -2
  113. package/group.js.map +1 -1
  114. package/groupMembership.d.ts +1 -1
  115. package/groupMembership.js +2 -1
  116. package/groupMembership.js.map +1 -1
  117. package/identities/getGroup.d.ts +14 -0
  118. package/identities/getGroup.js +5 -0
  119. package/identities/getGroup.js.map +1 -1
  120. package/identities/getUsers.d.ts +22 -0
  121. package/identities/getUsers.js +5 -0
  122. package/identities/getUsers.js.map +1 -1
  123. package/identities/group.d.ts +2 -2
  124. package/identities/group.js +3 -2
  125. package/identities/group.js.map +1 -1
  126. package/identities/groupMembership.d.ts +1 -1
  127. package/identities/groupMembership.js +2 -1
  128. package/identities/groupMembership.js.map +1 -1
  129. package/identities/index.js +14 -7
  130. package/identities/index.js.map +1 -1
  131. package/index.d.ts +12 -0
  132. package/index.js +117 -57
  133. package/index.js.map +1 -1
  134. package/iterativePermissions.js +1 -0
  135. package/iterativePermissions.js.map +1 -1
  136. package/package.json +4 -3
  137. package/package.json.bak +3 -2
  138. package/package.json.dev +4 -3
  139. package/pipeline/index.js +11 -4
  140. package/pipeline/index.js.map +1 -1
  141. package/pipeline/variableGroup.d.ts +5 -0
  142. package/pipeline/variableGroup.js +6 -0
  143. package/pipeline/variableGroup.js.map +1 -1
  144. package/policy/branchPolicyBuildValidation.js +1 -0
  145. package/policy/branchPolicyBuildValidation.js.map +1 -1
  146. package/policy/branchPolicyMinReviewers.js +1 -0
  147. package/policy/branchPolicyMinReviewers.js.map +1 -1
  148. package/policy/index.js +12 -5
  149. package/policy/index.js.map +1 -1
  150. package/pool.js +1 -0
  151. package/pool.js.map +1 -1
  152. package/project.js +1 -0
  153. package/project.js.map +1 -1
  154. package/projectFeatures.js +1 -0
  155. package/projectFeatures.js.map +1 -1
  156. package/projectPermissions.d.ts +1 -1
  157. package/projectPermissions.js +2 -1
  158. package/projectPermissions.js.map +1 -1
  159. package/provider.js +2 -1
  160. package/provider.js.map +1 -1
  161. package/queue.js +1 -0
  162. package/queue.js.map +1 -1
  163. package/repository/getRepositories.d.ts +15 -0
  164. package/repository/getRepositories.js +5 -0
  165. package/repository/getRepositories.js.map +1 -1
  166. package/repository/git.d.ts +24 -0
  167. package/repository/git.js +25 -0
  168. package/repository/git.js.map +1 -1
  169. package/repository/index.js +12 -5
  170. package/repository/index.js.map +1 -1
  171. package/repositoryPolicyAuthorEmailPattern.d.ts +43 -16
  172. package/repositoryPolicyAuthorEmailPattern.js +30 -14
  173. package/repositoryPolicyAuthorEmailPattern.js.map +1 -1
  174. package/repositoryPolicyCaseEnforcement.d.ts +152 -0
  175. package/repositoryPolicyCaseEnforcement.js +121 -0
  176. package/repositoryPolicyCaseEnforcement.js.map +1 -0
  177. package/repositoryPolicyCheckCredentials.d.ts +138 -0
  178. package/repositoryPolicyCheckCredentials.js +114 -0
  179. package/repositoryPolicyCheckCredentials.js.map +1 -0
  180. package/repositoryPolicyFilePathPattern.d.ts +39 -16
  181. package/repositoryPolicyFilePathPattern.js +29 -14
  182. package/repositoryPolicyFilePathPattern.js.map +1 -1
  183. package/repositoryPolicyMaxFileSize.d.ts +152 -0
  184. package/repositoryPolicyMaxFileSize.js +121 -0
  185. package/repositoryPolicyMaxFileSize.js.map +1 -0
  186. package/repositoryPolicyMaxPathLength.d.ts +152 -0
  187. package/repositoryPolicyMaxPathLength.js +121 -0
  188. package/repositoryPolicyMaxPathLength.js.map +1 -0
  189. package/repositoryPolicyReservedNames.d.ts +138 -0
  190. package/repositoryPolicyReservedNames.js +114 -0
  191. package/repositoryPolicyReservedNames.js.map +1 -0
  192. package/resourceAuthorization.js +1 -0
  193. package/resourceAuthorization.js.map +1 -1
  194. package/security/index.js +11 -4
  195. package/security/index.js.map +1 -1
  196. package/security/resourceAuthorization.js +1 -0
  197. package/security/resourceAuthorization.js.map +1 -1
  198. package/serviceEndpointArtifactory.js +1 -0
  199. package/serviceEndpointArtifactory.js.map +1 -1
  200. package/serviceEndpointAws.js +1 -0
  201. package/serviceEndpointAws.js.map +1 -1
  202. package/serviceEndpointAzureDevOps.js +1 -0
  203. package/serviceEndpointAzureDevOps.js.map +1 -1
  204. package/serviceEndpointAzureEcr.d.ts +0 -9
  205. package/serviceEndpointAzureEcr.js +1 -0
  206. package/serviceEndpointAzureEcr.js.map +1 -1
  207. package/serviceEndpointAzureRM.js +1 -0
  208. package/serviceEndpointAzureRM.js.map +1 -1
  209. package/serviceEndpointBitBucket.js +1 -0
  210. package/serviceEndpointBitBucket.js.map +1 -1
  211. package/serviceEndpointDockerRegistry.d.ts +0 -9
  212. package/serviceEndpointDockerRegistry.js +1 -0
  213. package/serviceEndpointDockerRegistry.js.map +1 -1
  214. package/serviceEndpointGeneric.d.ts +152 -0
  215. package/serviceEndpointGeneric.js +110 -0
  216. package/serviceEndpointGeneric.js.map +1 -0
  217. package/serviceEndpointGenericGit.d.ts +164 -0
  218. package/serviceEndpointGenericGit.js +112 -0
  219. package/serviceEndpointGenericGit.js.map +1 -0
  220. package/serviceEndpointGitHub.js +1 -0
  221. package/serviceEndpointGitHub.js.map +1 -1
  222. package/serviceEndpointGitHubEnterprise.js +1 -0
  223. package/serviceEndpointGitHubEnterprise.js.map +1 -1
  224. package/serviceEndpointKubernetes.d.ts +3 -3
  225. package/serviceEndpointKubernetes.js +1 -0
  226. package/serviceEndpointKubernetes.js.map +1 -1
  227. package/serviceEndpointNpm.js +1 -0
  228. package/serviceEndpointNpm.js.map +1 -1
  229. package/serviceEndpointPipeline.js +1 -0
  230. package/serviceEndpointPipeline.js.map +1 -1
  231. package/serviceEndpointServiceFabric.d.ts +25 -0
  232. package/serviceEndpointServiceFabric.js +26 -0
  233. package/serviceEndpointServiceFabric.js.map +1 -1
  234. package/serviceEndpointSonarQube.js +1 -0
  235. package/serviceEndpointSonarQube.js.map +1 -1
  236. package/serviceEndpointSsh.js +1 -0
  237. package/serviceEndpointSsh.js.map +1 -1
  238. package/serviceendpoint/azureRM.js +1 -0
  239. package/serviceendpoint/azureRM.js.map +1 -1
  240. package/serviceendpoint/bitBucket.js +1 -0
  241. package/serviceendpoint/bitBucket.js.map +1 -1
  242. package/serviceendpoint/dockerRegistry.d.ts +0 -9
  243. package/serviceendpoint/dockerRegistry.js +1 -0
  244. package/serviceendpoint/dockerRegistry.js.map +1 -1
  245. package/serviceendpoint/gitHub.js +1 -0
  246. package/serviceendpoint/gitHub.js.map +1 -1
  247. package/serviceendpoint/index.js +15 -8
  248. package/serviceendpoint/index.js.map +1 -1
  249. package/serviceendpoint/kubernetes.d.ts +3 -3
  250. package/serviceendpoint/kubernetes.js +1 -0
  251. package/serviceendpoint/kubernetes.js.map +1 -1
  252. package/team.d.ts +141 -0
  253. package/team.js +107 -0
  254. package/team.js.map +1 -0
  255. package/teamAdministrators.d.ts +129 -0
  256. package/teamAdministrators.js +105 -0
  257. package/teamAdministrators.js.map +1 -0
  258. package/teamMembers.d.ts +129 -0
  259. package/teamMembers.js +105 -0
  260. package/teamMembers.js.map +1 -0
  261. package/types/index.js +1 -0
  262. package/types/index.js.map +1 -1
  263. package/types/input.d.ts +10 -37
  264. package/types/output.d.ts +18 -37
  265. package/user.js +1 -0
  266. package/user.js.map +1 -1
  267. package/utilities.js +1 -0
  268. package/utilities.js.map +1 -1
  269. package/variableGroup.d.ts +5 -0
  270. package/variableGroup.js +6 -0
  271. package/variableGroup.js.map +1 -1
  272. package/workItemQueryPermissions.d.ts +2 -2
  273. package/workItemQueryPermissions.js +3 -2
  274. package/workItemQueryPermissions.js.map +1 -1
@@ -0,0 +1,114 @@
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.RepositoryPolicyCheckCredentials = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * 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.
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 repositoryPolicyCheckCredentials = new azuredevops.RepositoryPolicyCheckCredentials("repositoryPolicyCheckCredentials", {
32
+ * projectId: project.id,
33
+ * enabled: true,
34
+ * blocking: true,
35
+ * repositoryIds: [git.id],
36
+ * });
37
+ * ```
38
+ *
39
+ * # Set project level repository policy
40
+ * ```typescript
41
+ * import * as pulumi from "@pulumi/pulumi";
42
+ * import * as azuredevops from "@pulumi/azuredevops";
43
+ *
44
+ * const repositoryPolicyCheckCredentials = new azuredevops.RepositoryPolicyCheckCredentials("repositoryPolicyCheckCredentials", {
45
+ * projectId: azuredevops_project.p.id,
46
+ * enabled: true,
47
+ * blocking: true,
48
+ * });
49
+ * ```
50
+ * ## Relevant Links
51
+ *
52
+ * - [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)
53
+ *
54
+ * ## Import
55
+ *
56
+ * Azure DevOps repository policies can be imported using the projectID/policyID or projectName/policyID
57
+ *
58
+ * ```sh
59
+ * $ pulumi import azuredevops:index/repositoryPolicyCheckCredentials:RepositoryPolicyCheckCredentials p 00000000-0000-0000-0000-000000000000/0
60
+ * ```
61
+ */
62
+ class RepositoryPolicyCheckCredentials extends pulumi.CustomResource {
63
+ constructor(name, argsOrState, opts) {
64
+ let inputs = {};
65
+ opts = opts || {};
66
+ if (opts.id) {
67
+ const state = argsOrState;
68
+ inputs["blocking"] = state ? state.blocking : undefined;
69
+ inputs["enabled"] = state ? state.enabled : undefined;
70
+ inputs["projectId"] = state ? state.projectId : undefined;
71
+ inputs["repositoryIds"] = state ? state.repositoryIds : undefined;
72
+ }
73
+ else {
74
+ const args = argsOrState;
75
+ if ((!args || args.projectId === undefined) && !opts.urn) {
76
+ throw new Error("Missing required property 'projectId'");
77
+ }
78
+ inputs["blocking"] = args ? args.blocking : undefined;
79
+ inputs["enabled"] = args ? args.enabled : undefined;
80
+ inputs["projectId"] = args ? args.projectId : undefined;
81
+ inputs["repositoryIds"] = args ? args.repositoryIds : undefined;
82
+ }
83
+ if (!opts.version) {
84
+ opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
85
+ }
86
+ super(RepositoryPolicyCheckCredentials.__pulumiType, name, inputs, opts);
87
+ }
88
+ /**
89
+ * Get an existing RepositoryPolicyCheckCredentials resource's state with the given name, ID, and optional extra
90
+ * properties used to qualify the lookup.
91
+ *
92
+ * @param name The _unique_ name of the resulting resource.
93
+ * @param id The _unique_ provider ID of the resource to lookup.
94
+ * @param state Any extra arguments used during the lookup.
95
+ * @param opts Optional settings to control the behavior of the CustomResource.
96
+ */
97
+ static get(name, id, state, opts) {
98
+ return new RepositoryPolicyCheckCredentials(name, state, Object.assign(Object.assign({}, opts), { id: id }));
99
+ }
100
+ /**
101
+ * Returns true if the given object is an instance of RepositoryPolicyCheckCredentials. This is designed to work even
102
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
103
+ */
104
+ static isInstance(obj) {
105
+ if (obj === undefined || obj === null) {
106
+ return false;
107
+ }
108
+ return obj['__pulumiType'] === RepositoryPolicyCheckCredentials.__pulumiType;
109
+ }
110
+ }
111
+ exports.RepositoryPolicyCheckCredentials = RepositoryPolicyCheckCredentials;
112
+ /** @internal */
113
+ RepositoryPolicyCheckCredentials.__pulumiType = 'azuredevops:index/repositoryPolicyCheckCredentials:RepositoryPolicyCheckCredentials';
114
+ //# sourceMappingURL=repositoryPolicyCheckCredentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repositoryPolicyCheckCredentials.js","sourceRoot":"","sources":["../repositoryPolicyCheckCredentials.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAa,gCAAiC,SAAQ,MAAM,CAAC,cAAc;IAqDvE,YAAY,IAAY,EAAE,WAA0F,EAAE,IAAmC;QACrJ,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAgE,CAAC;YAC/E,MAAM,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,MAAM,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,MAAM,CAAC,eAAe,CAAC,GAAG,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,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,gCAAgC,CAAC,YAAY,CAAC;IACjF,CAAC;;AA1BL,4EA6EC;AA/DG,gBAAgB;AACO,6CAAY,GAAG,qFAAqF,CAAC"}
@@ -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 a file path pattern repository policy within Azure DevOps project.
5
4
  *
@@ -25,15 +24,27 @@ import { input as inputs, output as outputs } from "./types";
25
24
  * projectId: project.id,
26
25
  * enabled: true,
27
26
  * blocking: true,
28
- * settings: {
29
- * filepathPatterns: [
30
- * "*.go",
31
- * "/home/test/*.ts",
32
- * ],
33
- * scopes: [{
34
- * repositoryId: git.id,
35
- * }],
36
- * },
27
+ * filepathPatterns: [
28
+ * "*.go",
29
+ * "/home/test/*.ts",
30
+ * ],
31
+ * repositoryIds: [git.id],
32
+ * });
33
+ * ```
34
+ *
35
+ * # Set project level repository policy
36
+ * ```typescript
37
+ * import * as pulumi from "@pulumi/pulumi";
38
+ * import * as azuredevops from "@pulumi/azuredevops";
39
+ *
40
+ * const repositoryPolicyFilePathPattern = new azuredevops.RepositoryPolicyFilePathPattern("repositoryPolicyFilePathPattern", {
41
+ * projectId: azuredevops_project.p.id,
42
+ * enabled: true,
43
+ * blocking: true,
44
+ * filepathPatterns: [
45
+ * "*.go",
46
+ * "/home/test/*.ts",
47
+ * ],
37
48
  * });
38
49
  * ```
39
50
  * ## Relevant Links
@@ -72,14 +83,18 @@ export declare class RepositoryPolicyFilePathPattern extends pulumi.CustomResour
72
83
  * A flag indicating if the policy should be enabled. Defaults to `true`.
73
84
  */
74
85
  readonly enabled: pulumi.Output<boolean | undefined>;
86
+ /**
87
+ * Block pushes from introducing file paths that match the following patterns. Exact paths begin with "/". You can specify exact paths and wildcards. You can also specify multiple paths using ";" as a separator. Paths prefixed with "!" are excluded. Order is important.
88
+ */
89
+ readonly filepathPatterns: pulumi.Output<string[]>;
75
90
  /**
76
91
  * The ID of the project in which the policy will be created.
77
92
  */
78
93
  readonly projectId: pulumi.Output<string>;
79
94
  /**
80
- * Configuration for the policy. This block must be defined exactly once.
95
+ * 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
96
  */
82
- readonly settings: pulumi.Output<outputs.RepositoryPolicyFilePathPatternSettings>;
97
+ readonly repositoryIds: pulumi.Output<string[] | undefined>;
83
98
  /**
84
99
  * Create a RepositoryPolicyFilePathPattern resource with the given unique name, arguments, and options.
85
100
  *
@@ -101,14 +116,18 @@ export interface RepositoryPolicyFilePathPatternState {
101
116
  * A flag indicating if the policy should be enabled. Defaults to `true`.
102
117
  */
103
118
  enabled?: pulumi.Input<boolean>;
119
+ /**
120
+ * Block pushes from introducing file paths that match the following patterns. Exact paths begin with "/". You can specify exact paths and wildcards. You can also specify multiple paths using ";" as a separator. Paths prefixed with "!" are excluded. Order is important.
121
+ */
122
+ filepathPatterns?: pulumi.Input<pulumi.Input<string>[]>;
104
123
  /**
105
124
  * The ID of the project in which the policy will be created.
106
125
  */
107
126
  projectId?: pulumi.Input<string>;
108
127
  /**
109
- * Configuration for the policy. This block must be defined exactly once.
128
+ * 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
129
  */
111
- settings?: pulumi.Input<inputs.RepositoryPolicyFilePathPatternSettings>;
130
+ repositoryIds?: pulumi.Input<pulumi.Input<string>[]>;
112
131
  }
113
132
  /**
114
133
  * The set of arguments for constructing a RepositoryPolicyFilePathPattern resource.
@@ -122,12 +141,16 @@ export interface RepositoryPolicyFilePathPatternArgs {
122
141
  * A flag indicating if the policy should be enabled. Defaults to `true`.
123
142
  */
124
143
  enabled?: pulumi.Input<boolean>;
144
+ /**
145
+ * Block pushes from introducing file paths that match the following patterns. Exact paths begin with "/". You can specify exact paths and wildcards. You can also specify multiple paths using ";" as a separator. Paths prefixed with "!" are excluded. Order is important.
146
+ */
147
+ filepathPatterns: pulumi.Input<pulumi.Input<string>[]>;
125
148
  /**
126
149
  * The ID of the project in which the policy will be created.
127
150
  */
128
151
  projectId: pulumi.Input<string>;
129
152
  /**
130
- * Configuration for the policy. This block must be defined exactly once.
153
+ * 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
154
  */
132
- settings: pulumi.Input<inputs.RepositoryPolicyFilePathPatternSettings>;
155
+ repositoryIds?: pulumi.Input<pulumi.Input<string>[]>;
133
156
  }
@@ -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.RepositoryPolicyFilePathPattern = void 0;
5
6
  const pulumi = require("@pulumi/pulumi");
6
7
  const utilities = require("./utilities");
7
8
  /**
@@ -29,15 +30,27 @@ const utilities = require("./utilities");
29
30
  * projectId: project.id,
30
31
  * enabled: true,
31
32
  * blocking: true,
32
- * settings: {
33
- * filepathPatterns: [
34
- * "*.go",
35
- * "/home/test/*.ts",
36
- * ],
37
- * scopes: [{
38
- * repositoryId: git.id,
39
- * }],
40
- * },
33
+ * filepathPatterns: [
34
+ * "*.go",
35
+ * "/home/test/*.ts",
36
+ * ],
37
+ * repositoryIds: [git.id],
38
+ * });
39
+ * ```
40
+ *
41
+ * # Set project level repository policy
42
+ * ```typescript
43
+ * import * as pulumi from "@pulumi/pulumi";
44
+ * import * as azuredevops from "@pulumi/azuredevops";
45
+ *
46
+ * const repositoryPolicyFilePathPattern = new azuredevops.RepositoryPolicyFilePathPattern("repositoryPolicyFilePathPattern", {
47
+ * projectId: azuredevops_project.p.id,
48
+ * enabled: true,
49
+ * blocking: true,
50
+ * filepathPatterns: [
51
+ * "*.go",
52
+ * "/home/test/*.ts",
53
+ * ],
41
54
  * });
42
55
  * ```
43
56
  * ## Relevant Links
@@ -60,21 +73,23 @@ class RepositoryPolicyFilePathPattern extends pulumi.CustomResource {
60
73
  const state = argsOrState;
61
74
  inputs["blocking"] = state ? state.blocking : undefined;
62
75
  inputs["enabled"] = state ? state.enabled : undefined;
76
+ inputs["filepathPatterns"] = state ? state.filepathPatterns : undefined;
63
77
  inputs["projectId"] = state ? state.projectId : undefined;
64
- inputs["settings"] = state ? state.settings : undefined;
78
+ inputs["repositoryIds"] = state ? state.repositoryIds : undefined;
65
79
  }
66
80
  else {
67
81
  const args = argsOrState;
82
+ if ((!args || args.filepathPatterns === undefined) && !opts.urn) {
83
+ throw new Error("Missing required property 'filepathPatterns'");
84
+ }
68
85
  if ((!args || args.projectId === undefined) && !opts.urn) {
69
86
  throw new Error("Missing required property 'projectId'");
70
87
  }
71
- if ((!args || args.settings === undefined) && !opts.urn) {
72
- throw new Error("Missing required property 'settings'");
73
- }
74
88
  inputs["blocking"] = args ? args.blocking : undefined;
75
89
  inputs["enabled"] = args ? args.enabled : undefined;
90
+ inputs["filepathPatterns"] = args ? args.filepathPatterns : undefined;
76
91
  inputs["projectId"] = args ? args.projectId : undefined;
77
- inputs["settings"] = args ? args.settings : undefined;
92
+ inputs["repositoryIds"] = args ? args.repositoryIds : undefined;
78
93
  }
79
94
  if (!opts.version) {
80
95
  opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
@@ -1 +1 @@
1
- {"version":3,"file":"repositoryPolicyFilePathPattern.js","sourceRoot":"","sources":["../repositoryPolicyFilePathPattern.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAa,+BAAgC,SAAQ,MAAM,CAAC,cAAc;IAqDtE,YAAY,IAAY,EAAE,WAAwF,EAAE,IAAmC;QACnJ,IA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ulumi/pulumi";
2
+ /**
3
+ * Manage a max file size repository policy within Azure DevOps project.
4
+ *
5
+ * > If both project and project policy are enabled, the repository 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 repositoryPolicyMaxFileSize = new azuredevops.RepositoryPolicyMaxFileSize("repositoryPolicyMaxFileSize", {
26
+ * projectId: project.id,
27
+ * enabled: true,
28
+ * blocking: true,
29
+ * maxFileSize: 1,
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 repositoryPolicyMaxFileSize = new azuredevops.RepositoryPolicyMaxFileSize("repositoryPolicyMaxFileSize", {
40
+ * projectId: azuredevops_project.p.id,
41
+ * enabled: true,
42
+ * blocking: true,
43
+ * maxFileSize: 1,
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/repositoryPolicyMaxFileSize:RepositoryPolicyMaxFileSize p 00000000-0000-0000-0000-000000000000/0
56
+ * ```
57
+ */
58
+ export declare class RepositoryPolicyMaxFileSize extends pulumi.CustomResource {
59
+ /**
60
+ * Get an existing RepositoryPolicyMaxFileSize 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?: RepositoryPolicyMaxFileSizeState, opts?: pulumi.CustomResourceOptions): RepositoryPolicyMaxFileSize;
69
+ /**
70
+ * Returns true if the given object is an instance of RepositoryPolicyMaxFileSize. 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 RepositoryPolicyMaxFileSize;
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
+ * Block pushes that contain new or updated files larger than this limit. Available values is: `1, 2, 5, 10, 100, 200` (MB).
84
+ */
85
+ readonly maxFileSize: pulumi.Output<number>;
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 RepositoryPolicyMaxFileSize 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: RepositoryPolicyMaxFileSizeArgs, opts?: pulumi.CustomResourceOptions);
102
+ }
103
+ /**
104
+ * Input properties used for looking up and filtering RepositoryPolicyMaxFileSize resources.
105
+ */
106
+ export interface RepositoryPolicyMaxFileSizeState {
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
+ * Block pushes that contain new or updated files larger than this limit. Available values is: `1, 2, 5, 10, 100, 200` (MB).
117
+ */
118
+ maxFileSize?: pulumi.Input<number>;
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 RepositoryPolicyMaxFileSize resource.
130
+ */
131
+ export interface RepositoryPolicyMaxFileSizeArgs {
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
+ * Block pushes that contain new or updated files larger than this limit. Available values is: `1, 2, 5, 10, 100, 200` (MB).
142
+ */
143
+ maxFileSize: pulumi.Input<number>;
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.RepositoryPolicyMaxFileSize = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * Manage a max file size repository policy within Azure DevOps project.
10
+ *
11
+ * > If both project and project policy are enabled, the repository 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 repositoryPolicyMaxFileSize = new azuredevops.RepositoryPolicyMaxFileSize("repositoryPolicyMaxFileSize", {
32
+ * projectId: project.id,
33
+ * enabled: true,
34
+ * blocking: true,
35
+ * maxFileSize: 1,
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 repositoryPolicyMaxFileSize = new azuredevops.RepositoryPolicyMaxFileSize("repositoryPolicyMaxFileSize", {
46
+ * projectId: azuredevops_project.p.id,
47
+ * enabled: true,
48
+ * blocking: true,
49
+ * maxFileSize: 1,
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/repositoryPolicyMaxFileSize:RepositoryPolicyMaxFileSize p 00000000-0000-0000-0000-000000000000/0
62
+ * ```
63
+ */
64
+ class RepositoryPolicyMaxFileSize 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["maxFileSize"] = state ? state.maxFileSize : 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.maxFileSize === undefined) && !opts.urn) {
79
+ throw new Error("Missing required property 'maxFileSize'");
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["maxFileSize"] = args ? args.maxFileSize : 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(RepositoryPolicyMaxFileSize.__pulumiType, name, inputs, opts);
94
+ }
95
+ /**
96
+ * Get an existing RepositoryPolicyMaxFileSize 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 RepositoryPolicyMaxFileSize(name, state, Object.assign(Object.assign({}, opts), { id: id }));
106
+ }
107
+ /**
108
+ * Returns true if the given object is an instance of RepositoryPolicyMaxFileSize. 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'] === RepositoryPolicyMaxFileSize.__pulumiType;
116
+ }
117
+ }
118
+ exports.RepositoryPolicyMaxFileSize = RepositoryPolicyMaxFileSize;
119
+ /** @internal */
120
+ RepositoryPolicyMaxFileSize.__pulumiType = 'azuredevops:index/repositoryPolicyMaxFileSize:RepositoryPolicyMaxFileSize';
121
+ //# sourceMappingURL=repositoryPolicyMaxFileSize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repositoryPolicyMaxFileSize.js","sourceRoot":"","sources":["../repositoryPolicyMaxFileSize.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,MAAa,2BAA4B,SAAQ,MAAM,CAAC,cAAc;IAyDlE,YAAY,IAAY,EAAE,WAAgF,EAAE,IAAmC;QAC3I,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA2D,CAAC;YAC1E,MAAM,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,MAAM,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,MAAM,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,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