functions/generated/Wiki/Set-AdsWikiPage.ps1
function Set-AdsWikiPage { <# .SYNOPSIS .DESCRIPTION Edits a wiki page. .PARAMETER Version Version of the page on which the change is to be made. Mandatory for `Edit` scenario. To be populated in the If-Match header of the request. .PARAMETER Comment Comment to be associated with the page operation. .PARAMETER WikiIdentifier Wiki ID or wiki name. .PARAMETER Id Wiki page ID. .PARAMETER Project Project ID or project name .PARAMETER Organization The name of the Azure DevOps organization. .PARAMETER ApiVersion Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api. .EXAMPLE PS C:\> Set-AdsWikiPage -Version $version <insert description here> .EXAMPLE PS C:\> Set-AdsWikiPage -WikiIdentifier $wikiidentifier -Id $id -Project $project -Organization $organization -ApiVersion $apiversion Edits a wiki page. .LINK <unknown> #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] [CmdletBinding(DefaultParameterSetName = 'default')] param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Pages_Get Page By Id')] [string] $Version, [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Comment, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $WikiIdentifier, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Id, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Project, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Organization, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $ApiVersion ) process { $__mapping = @{ 'Version' = 'Version' 'Comment' = 'comment' 'ApiVersion' = 'api-version' } $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Comment','ApiVersion') -Mapping $__mapping $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @('Version') -Mapping $__mapping $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages/{id}' -Replace '{wikiIdentifier}',$WikiIdentifier -Replace '{id}',$Id -Replace '{project}',$Project -Replace '{organization}',$Organization Invoke-RestRequest -Path $__path -Method patch -Body $__body -Query $__query -Header $__header } } |