functions/generated/Dashboard/New-AdsDashboardDashboard.ps1
function New-AdsDashboardDashboard { <# .SYNOPSIS .DESCRIPTION Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content. .PARAMETER Organization The name of the Azure DevOps organization. .PARAMETER Team Team ID or team name .PARAMETER DashboardId ID of the dashboard to replace. .PARAMETER Project Project ID or project name .PARAMETER ApiVersion Version of the API to use. This should be set to '7.1-preview.3' to use this version of the api. .EXAMPLE PS C:\> New-AdsDashboardDashboard -Organization $organization -Team $team -DashboardId $dashboardid -Project $project -ApiVersion $apiversion Replace configuration for the specified dashboard. Replaces Widget list on Dashboard, only if property is supplied. .EXAMPLE PS C:\> New-AdsDashboardDashboard -Organization $organization -Team $team -Project $project -ApiVersion $apiversion Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content. .LINK <unknown> #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] [CmdletBinding(DefaultParameterSetName = 'default')] param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')] [string] $Organization, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')] [string] $Team, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')] [string] $DashboardId, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')] [string] $Project, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Dashboards_Replace Dashboard')] [string] $ApiVersion ) process { $__mapping = @{ 'ApiVersion' = 'api-version' } $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ApiVersion') -Mapping $__mapping $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/dashboard/dashboards' -Replace '{organization}',$Organization -Replace '{team}',$Team -Replace '{project}',$Project if ($DashboardId) { $__path += "/$DashboardId" } Invoke-RestRequest -Path $__path -Method put -Body $__body -Query $__query -Header $__header } } |