functions/generated/Audit/Get-AdsAuditAuditlog.ps1

function Get-AdsAuditAuditlog {
<#
.SYNOPSIS
     
 
.DESCRIPTION
    Queries audit log entries
 
.PARAMETER ContinuationToken
    Token used for returning next set of results from previous query. Optional
 
.PARAMETER BatchSize
    Max number of results to return. Optional
 
.PARAMETER SkipAggregation
    Skips aggregating events and leaves them as individual entries instead. By default events are aggregated. Event types that are aggregated: AuditLog.AccessLog.
 
.PARAMETER StartTime
    Start time of download window. Optional
 
.PARAMETER EndTime
    End time of download window. Optional
 
.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:\> Get-AdsAuditAuditlog -Organization $organization -ApiVersion $apiversion
 
    Queries audit log entries
 
.LINK
    <unknown>
#>

    [CmdletBinding(DefaultParameterSetName = 'default')]
    param (
        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ContinuationToken,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [int32]
        $BatchSize,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [boolean]
        $SkipAggregation,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $StartTime,

        [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $EndTime,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $Organization,

        [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')]
        [string]
        $ApiVersion
    )
    process {
        $__mapping = @{
            'ContinuationToken' = 'continuationToken'
            'BatchSize' = 'batchSize'
            'SkipAggregation' = 'skipAggregation'
            'StartTime' = 'startTime'
            'EndTime' = 'endTime'
            'ApiVersion' = 'api-version'
        }
        $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','BatchSize','SkipAggregation','StartTime','EndTime','ApiVersion') -Mapping $__mapping
        $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping
        $__path = 'https://auditservice.dev.azure.com/{organization}/_apis/audit/auditlog' -Replace '{organization}',$Organization

        Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header
    }
}