@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
|
@@ -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,CA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AE,KAA6C,EAAE,IAAmC;QAC3I,OAAO,IAAI,gCAAgC,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACvF,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,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
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
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["
|
|
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["
|
|
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
|
|
1
|
+
{"version":3,"file":"repositoryPolicyFilePathPattern.js","sourceRoot":"","sources":["../repositoryPolicyFilePathPattern.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAa,+BAAgC,SAAQ,MAAM,CAAC,cAAc;IAyDtE,YAAY,IAAY,EAAE,WAAwF,EAAE,IAAmC;QACnJ,IAAI,MAAM,GAAkB,E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age 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;A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