manifests/collectors/AI/MLEndpoints.psd1

#
# GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/AI/MLEndpoints.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 = @(
        'AZSC/ARMChild/MLEndpoints'
    )

    ResourceTypeMatching = 'Grouped'

    AdditionalFilter = $null

    FilterPreamble = ''

    RowLoopVariable = '1'

    Preamble = @'
$ws = $Resources | Where-Object { $_.id -eq $1.PARENTID } | Select-Object -First 1
                            $sub1 = $SUB | Where-Object { $_.Id -eq $1.subscriptionId }
                            $endpointType = $1.AZSC.EndpointType
                            $ResUCount = 1
                            $eProp = $1.properties
 
                            $deplCount = $1.AZSC.DeploymentCount
'@


    AdditionalRowLoops = @()

    TagLoop = $null

    Fields = @(
        @{
            Name = 'Workspace Name'
            Expression = '$ws.NAME'
        }
        @{
            Name = 'Subscription'
            Expression = '$sub1.Name'
        }
        @{
            Name = 'Resource Group'
            Expression = '$ws.RESOURCEGROUP'
        }
        @{
            Name = 'Endpoint Name'
            Expression = '$1.name'
        }
        @{
            Name = 'Endpoint Type'
            Expression = 'if ($endpointType -eq ''onlineEndpoints'') { ''Online'' } else { ''Batch'' }'
        }
        @{
            Name = 'Auth Mode'
            Expression = 'if ($eProp.authMode) { $eProp.authMode } else { ''N/A'' }'
        }
        @{
            Name = 'Scoring URI'
            Expression = 'if ($eProp.scoringUri) { $eProp.scoringUri } else { ''N/A'' }'
        }
        @{
            Name = 'Deployments Count'
            Expression = '$deplCount'
        }
        @{
            Name = 'Provisioning State'
            Expression = 'if ($eProp.provisioningState) { $eProp.provisioningState } else { ''N/A'' }'
        }
        @{
            Name = 'Description'
            Expression = 'if ($eProp.description) { $eProp.description } else { ''N/A'' }'
        }
        @{
            Name = 'Resource U'
            Expression = '$ResUCount'
        }
        @{
            Name = 'Tag Name'
            Expression = ''''''
        }
        @{
            Name = 'Tag Value'
            Expression = ''''''
        }
    )

    Export = @{
        WorksheetName = 'ML Endpoints'
        TableNamePrefix = 'MLEndpointsTable_'
        Columns = @(
            'Workspace Name'
            'Subscription'
            'Resource Group'
            'Endpoint Name'
            'Endpoint Type'
            'Auth Mode'
            'Scoring URI'
            'Deployments Count'
            'Provisioning State'
            'Description'
            'Resource U'
        )
        TagColumns = @()
        TagColumnsBefore = $null
        NumberFormat = '0'
        ConditionalText = @()
    }

    SourceCollector = 'Modules/Public/InventoryModules/AI/MLEndpoints.ps1'
}