DscResources/Sentinel/Sentinel.schema.psm1

# (2024-10-18 01:26:47) Generated using Microsoft365DSC v1.24.1016.1
Configuration 'Sentinel'
{
    param
    (
        [Parameter(Mandatory = $true)]
        [System.String]
        $ApplicationId,

        [Parameter(Mandatory = $true)]
        [System.String]
        $TenantId,

        [Parameter(Mandatory = $true)]
        [System.String]
        $CertificateThumbprint
    )

    Import-DscResource -ModuleName Microsoft365DSC

    foreach ($Setting in $ConfigurationData.NonNodeData.Sentinel.Settings)
    {
        $resourceTitle = 'SentinelSetting-{0}' -f $Setting.ResourceGroupName

        $parameters = $Setting
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'SentinelSetting' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }

    foreach ($Watchlist in $ConfigurationData.NonNodeData.Sentinel.Watchlists)
    {
        $resourceTitle = 'SentinelWatchlist-{0}' -f $Watchlist.Name

        $parameters = $Watchlist
        $parameters.ApplicationId = $ApplicationId
        $parameters.TenantId = $TenantId
        $parameters.CertificateThumbprint = $CertificateThumbprint

        if ($parameters.ContainsKey('UniqueId'))
        {
            $parameters.Remove('UniqueId')
        }
        (Get-DscSplattedResource -ResourceName 'SentinelWatchlist' -ExecutionName $resourceTitle -Properties $parameters -NoInvoke).Invoke($parameters)
    }
}