-
Notifications
You must be signed in to change notification settings - Fork 154
Expand file tree
/
Copy pathAdd-VSTeamTaskGroup.ps1
More file actions
42 lines (37 loc) · 1.38 KB
/
Add-VSTeamTaskGroup.ps1
File metadata and controls
42 lines (37 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Adds a task group.
#
# Get-VSTeamOption 'distributedtask' 'taskgroups'
# id : 6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7
# area : distributedtask
# resourceName : taskgroups
# routeTemplate : {project}/_apis/{area}/{resource}/{taskGroupId}
# http://bit.ly/Add-VSTeamTaskGroup
function Add-VSTeamTaskGroup {
[CmdletBinding(HelpUri='https://methodsandpractices.github.io/vsteam-docs/modules/vsteam/Add-VSTeamTaskGroup')]
param(
[Parameter(ParameterSetName = 'ByFile', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
[string] $InFile,
[Parameter(ParameterSetName = 'ByBody', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
[string] $Body,
[Parameter(Mandatory = $true, Position = 0, ValueFromPipelineByPropertyName = $true)]
[vsteam_lib.ProjectValidateAttribute($false)]
[ArgumentCompleter([vsteam_lib.ProjectCompleter])]
[string] $ProjectName
)
process {
$commonArgs = @{
Method = 'Post'
Area = 'distributedtask'
Resource = 'taskgroups'
ProjectName = $ProjectName
Version = $(_getApiVersion TaskGroups)
}
if ($InFile) {
$resp = _callAPI @commonArgs -InFile $InFile
}
else {
$resp = _callAPI @commonArgs -Body $Body
}
return $resp
}
}