manifests/collectors/Management/DevOpsAgentPools.psd1
|
# # GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/Management/DevOpsAgentPools.ps1 (AB#5660). # Field expressions are copied verbatim from the original collector and evaluate in an # equivalent scope -- see docs/design/decisions/declarative-collectors.md. # Review before trusting; regenerate rather than hand-patch if the source collector changes. # @{ ResourceTypes = @( 'devops/agentpools' ) ResourceTypeMatching = 'Grouped' AdditionalFilter = $null FilterPreamble = '' RowLoopVariable = '1' Preamble = @' $ResUCount = 1 $data = $1.properties # isHosted true means Microsoft runs the agents; false means the customer does, # which is the set that carries patching and capacity obligations. $hosting = if ($data.PSObject.Properties.Name -contains 'isHosted' -and $data.isHosted) { 'Microsoft-hosted' } else { 'Self-hosted' } $createdOn = if ($data.PSObject.Properties.Name -contains 'createdOn' -and $data.createdOn) { ([datetime]$data.createdOn).ToString('MM/dd/yyyy HH:mm') } else { $null } $owner = if ($data.PSObject.Properties.Name -contains 'owner' -and $data.owner) { $data.owner.displayName } else { $null } $isLegacy = if ($data.PSObject.Properties.Name -contains 'isLegacy') { [string]$data.isLegacy } else { $null } $autoProvision = if ($data.PSObject.Properties.Name -contains 'autoProvision') { [string]$data.autoProvision } else { $null } '@ AdditionalRowLoops = @() TagLoop = $null Fields = @( @{ Name = 'ID' Expression = '$1.id' } @{ Name = 'Organization' Expression = '$1.organization' } @{ Name = 'Pool Name' Expression = '$1.name' } @{ Name = 'Pool ID' Expression = '$data.id' } @{ Name = 'Hosting Model' Expression = '$hosting' } @{ Name = 'Pool Type' Expression = '$data.poolType' } @{ Name = 'Agent Size' Expression = '$data.size' } @{ Name = 'Auto Provision' Expression = '$autoProvision' } @{ Name = 'Legacy' Expression = '$isLegacy' } @{ Name = 'Created On' Expression = '$createdOn' } @{ Name = 'Owner' Expression = '$owner' } @{ Name = 'Resource U' Expression = '$ResUCount' } ) Export = @{ WorksheetName = 'ADO Agent Pools' TableNamePrefix = 'ADOAgentPoolsTable_' Columns = @( 'Organization' 'Pool Name' 'Pool ID' 'Hosting Model' 'Pool Type' 'Agent Size' 'Auto Provision' 'Legacy' 'Created On' 'Owner' 'Resource U' ) TagColumns = @() TagColumnsBefore = $null NumberFormat = '0' ConditionalText = @( 'New-ConditionalText -Text ''Self-hosted'' -Range D:D -ConditionalType ContainsText -BackgroundColor Yellow' ) } SourceCollector = 'Modules/Public/InventoryModules/Management/DevOpsAgentPools.ps1' } |