cloudlets/List-CloudletSchemas.ps1

function List-CloudletSchemas
{
    Param(
        [Parameter(Mandatory=$false)] [string] $CloudletType,
        [Parameter(Mandatory=$false)] [string] $EdgeRCFile = '~\.edgerc',
        [Parameter(Mandatory=$false)] [string] $Section = 'cloudlets',
        [Parameter(Mandatory=$false)] [string] $AccountSwitchKey
    )

    $Path = "/cloudlets/api/v2/schemas?cloudletType=$CloudletType&accountSwitchKey=$AccountSwitchKey"
    
    try {
        $Result = Invoke-AkamaiRestMethod -Method GET -Path $Path -EdgeRCFile $EdgeRCFile -Section $Section
        return $Result.schemas
    }
    catch {
        throw $_.Exception
    }
}