manifests/collectors/AI/AIFoundryProjects.psd1
|
# # GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/AI/AIFoundryProjects.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 = @( 'microsoft.machinelearningservices/workspaces' ) ResourceTypeMatching = 'Grouped' AdditionalFilter = '$_.KIND -eq ''Project''' FilterPreamble = '' RowLoopVariable = '1' Preamble = @' $ResUCount = 1 $sub1 = $SUB | Where-Object { $_.Id -eq $1.subscriptionId } $data = $1.PROPERTIES $Tags = if (![string]::IsNullOrEmpty($1.tags.psobject.properties)) { $1.tags.psobject.properties } else { '0' } # Hub reference $hubId = if ($data.hubResourceId) { $data.hubResourceId } else { 'N/A' } $hubName = if ($hubId -ne 'N/A') { ($hubId -split '/')[-1] } else { 'N/A' } # Associated resources $storageAccount = if ($data.storageAccount) { ($data.storageAccount -split '/')[-1] } else { 'N/A' } $keyVault = if ($data.keyVault) { ($data.keyVault -split '/')[-1] } else { 'N/A' } $appInsights = if ($data.applicationInsights) { ($data.applicationInsights -split '/')[-1] } else { 'N/A' } $containerReg = if ($data.containerRegistry) { ($data.containerRegistry -split '/')[-1] } else { 'None' } '@ AdditionalRowLoops = @() TagLoop = @{ Variable = 'Tag' Source = '$Tags' Preamble = '' } Fields = @( @{ Name = 'ID' Expression = '$1.id' } @{ Name = 'Subscription' Expression = '$sub1.Name' } @{ Name = 'Resource Group' Expression = '$1.RESOURCEGROUP' } @{ Name = 'Project Name' Expression = '$1.NAME' } @{ Name = 'Location' Expression = '$1.LOCATION' } @{ Name = 'Friendly Name' Expression = 'if ($data.friendlyName) { $data.friendlyName } else { ''N/A'' }' } @{ Name = 'Description' Expression = 'if ($data.description) { $data.description } else { ''N/A'' }' } @{ Name = 'Hub Name' Expression = '$hubName' } @{ Name = 'Hub Resource ID' Expression = '$hubId' } @{ Name = 'Public Network Access' Expression = 'if ($data.publicNetworkAccess) { $data.publicNetworkAccess } else { ''N/A'' }' } @{ Name = 'Storage Account' Expression = '$storageAccount' } @{ Name = 'Key Vault' Expression = '$keyVault' } @{ Name = 'App Insights' Expression = '$appInsights' } @{ Name = 'Container Registry' Expression = '$containerReg' } @{ Name = 'Provisioning State' Expression = 'if ($data.provisioningState) { $data.provisioningState } else { ''N/A'' }' } @{ Name = 'Resource U' Expression = '$ResUCount' } @{ Name = 'Tag Name' Expression = '[string]$Tag.Name' } @{ Name = 'Tag Value' Expression = '[string]$Tag.Value' } ) Export = @{ WorksheetName = 'AI Foundry Projects' TableNamePrefix = 'AIFoundryProjectsTable_' Columns = @( 'Subscription' 'Resource Group' 'Project Name' 'Location' 'Friendly Name' 'Description' 'Hub Name' 'Public Network Access' 'Storage Account' 'Key Vault' 'App Insights' 'Container Registry' 'Provisioning State' 'Resource U' ) TagColumns = @( 'Tag Name' 'Tag Value' ) TagColumnsBefore = $null NumberFormat = '0' ConditionalText = @() } SourceCollector = 'Modules/Public/InventoryModules/AI/AIFoundryProjects.ps1' } |