manifests/collectors/AI/BotServices.psd1

#
# GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/AI/BotServices.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.botservice/botservices'
    )

    ResourceTypeMatching = 'Grouped'

    AdditionalFilter = $null

    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' }
'@


    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 = 'Name'
            Expression = '$1.NAME'
        }
        @{
            Name = 'Location'
            Expression = '$1.LOCATION'
        }
        @{
            Name = 'SKU'
            Expression = 'if ($1.SKU.name) { $1.SKU.name } else { ''N/A'' }'
        }
        @{
            Name = 'Display Name'
            Expression = 'if ($data.displayName) { $data.displayName } else { ''N/A'' }'
        }
        @{
            Name = 'Messaging Endpoint'
            Expression = 'if ($data.endpoint) { $data.endpoint } else { ''N/A'' }'
        }
        @{
            Name = 'App ID'
            Expression = 'if ($data.msaAppId) { $data.msaAppId } else { ''N/A'' }'
        }
        @{
            Name = 'MSA App Type'
            Expression = 'if ($data.msaAppType) { $data.msaAppType } else { ''N/A'' }'
        }
        @{
            Name = 'Developer App Key'
            Expression = 'if ($data.developerAppInsightsKey){ $data.developerAppInsightsKey} else { ''N/A'' }'
        }
        @{
            Name = 'CMEK Enabled'
            Expression = 'if ($data.isCmekEnabled -eq $true){ ''Yes'' } else { ''No'' }'
        }
        @{
            Name = 'Public Network Access'
            Expression = 'if ($data.publicNetworkAccess) { $data.publicNetworkAccess } else { ''N/A'' }'
        }
        @{
            Name = 'Schema Transformation Ver'
            Expression = 'if ($data.schemaTransformationVersion) { $data.schemaTransformationVersion } else { ''N/A'' }'
        }
        @{
            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 = 'Bot Services'
        TableNamePrefix = 'BotServicesTable_'
        Columns = @(
            'Subscription'
            'Resource Group'
            'Name'
            'Location'
            'SKU'
            'Display Name'
            'Messaging Endpoint'
            'App ID'
            'MSA App Type'
            'CMEK Enabled'
            'Public Network Access'
            'Provisioning State'
            'Resource U'
        )
        TagColumns = @(
            'Tag Name'
            'Tag Value'
        )
        TagColumnsBefore = $null
        NumberFormat = '0'
        ConditionalText = @()
    }

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