Checks/Aws/Test-OrganizationsOptOutAiServicesPolicy.ps1

function Test-OrganizationsOptOutAiServicesPolicy {
    <#
    .SYNOPSIS
        AWS Organization has opted out of all AI services and child accounts cannot override the policy

    .DESCRIPTION
        **AWS Organizations** is assessed for an AI services opt-out policy that sets `services.default.opt_out_policy` to `optOut` and blocks child overrides via `@@operators_allowed_for_child_policies` set to `@@none`.

    .PARAMETER Check
        CIEMCheck object containing check metadata.
    #>

    [CmdletBinding()]
    [OutputType([PSCustomObject[]])]
    param(
        [Parameter(Mandatory)]
        [CIEMCheck]$Check
    )

    $ErrorActionPreference = 'Stop'

    # TODO: Implement check logic based on Prowler check: organizations_opt_out_ai_services_policy

    [CIEMScanResult]::Create($Check, 'MANUAL', 'This check requires manual implementation. See Prowler check organizations_opt_out_ai_services_policy for reference.', 'N/A', 'organizations Resources')
}