Akamai.APIKeyManager.psm1

function Get-BodyObject {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory)]
        $Source
    )

    if ($Source -is 'String') {
        # Trim whitespace
        $Source = $Source.Trim()
        # Handle JSON array
        if ($Source.StartsWith('[')) {
            $BodyObject = ConvertFrom-Json -InputObject $Source -AsArray -NoEnumerate
        }
        # Handle standard JSON object
        elseif ($Source.StartsWith('{') -and $Source.EndsWith('}')) {
            $BodyObject = ConvertFrom-Json -InputObject $Source
        }
        # If none of the above, just use string as-is
        else {
            $BodyObject = $Source
        }
    }
    elseif ($Source -is 'Hashtable') {
        $BodyObject = [PScustomObject] $Source
    }
    elseif ($Source -is 'PSCustomObject' -or $Source -is 'Object' -or $Source -is 'Object[]') {
        $BodyObject = $Source
    }
    else {
        throw "Source param is of an unhandled type '$($Source.GetType().Name)'"
    }

    return $BodyObject
}

function Add-APIKeyToCollection {
    [CmdletBinding(DefaultParameterSetName = 'Attributes')]
    Param(
        [Parameter(ParameterSetName = 'Attributes', Mandatory)]
        [int64[]]
        $CollectionIDs,

        [Parameter(ParameterSetName = 'Attributes', Mandatory)]
        [int64[]]
        $KeyIDs,

        [Parameter(ParameterSetName = 'Body', ValueFromPipeline, Mandatory)]
        $Body,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    process {
        $Path = "/apikey-manager-api/v2/keys/assign"
        if ($PSCmdlet.ParameterSetName -eq 'Attributes') {
            $Body = @{
                'collectionIds' = $CollectionIDs
                'keyIds'        = $KeyIds
            }
        }
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'POST'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body.keys
    }
}


function Export-APIKey {
    [CmdletBinding()]
    param(
        [Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64]
        $CollectionID,

        [Parameter()]
        [string]
        $OutputFileName,

        [Parameter()]
        [switch]
        $PassThru,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    process {
        if ($OutputFileName) {
            if (-not $OutputFileName.EndsWith('.json') -and -not $OutputFileName.EndsWith('.xml') -and -not $OutputFileName.EndsWith('.csv')) {
                throw "OutputFileName must use either a json, xml or csv file extension"
            }
            if ($OutputFileName.EndsWith('.csv')) {
                $AdditionalHeaders = @{
                    'Accept' = 'text/csv'
                }
            }
            elseif ($OutputFileName.EndsWith('.xml')) {
                $AdditionalHeaders = @{
                    'Accept' = 'application/xml'
                }
            }
        }

        if ($CollectionID) {
            $Path = "/apikey-manager-api/v2/collections/$CollectionID/keys/export"
        }
        else {
            $Path = "/apikey-manager-api/v2/keys/export"
        }
        $RequestParams = @{
            'Path'              = $Path
            'Method'            = 'GET'
            'AdditionalHeaders' = $AdditionalHeaders
            'EdgeRCFile'        = $EdgeRCFile
            'Section'           = $Section
            'AccountSwitchKey'  = $AccountSwitchKey
            'Debug'             = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        if ($OutputFileName) {
            Write-Host 'Writing keys to: ' -NoNewline
            Write-Host $OutputFileName -ForegroundColor Green -NoNewline
            Write-Host '.'
            # JSON
            if ($OutputFileName.EndsWith('.json')) {
                ConvertTo-Json -InputObject @($Response.Body) -Depth 100 | Out-File -FilePath $OutputFileName -Encoding utf8
            }
            # XML
            elseif ($OutputFileName.EndsWith('.xml')) {
                $StringWriter = New-Object System.Io.Stringwriter
                $XMLWriter = New-Object System.Xml.XmlTextWriter($StringWriter)
                $XMLWriter.Formatting = "indented"
                $XMLWriter.IndentChar = " "
                $XMLWriter.Indentation = 4
                $Response.Body.WriteContentTo($XMLWriter)
                $StringWriter.ToString() | Out-File $OutputFileName -Encoding utf8 -NoNewline
            }
            # CSV
            else {
                $ExportParams = @{
                    Path              = $OutputFileName
                    NoTypeInformation = $true
                }
                if ($PSVersionTable.PSVersion -ge '7.0.0') {
                    $ExportParams.UseQuotes = 'AsNeeded'
                }
                $Response.Body | Export-Csv @ExportParams
            }
        }
        if (-not $OutputFileName -or $PassThru) {
            return $Response.Body
        }
    }
}


function Get-APIKey {
    [CmdletBinding(DefaultParameterSetName = 'Get all')]
    Param(
        [Parameter(ParameterSetName = 'Get one', ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64]
        $KeyID,

        [Parameter(ParameterSetName = 'Get all')]
        [int64]
        $CollectionID,

        [Parameter(ParameterSetName = 'Get all')]
        [string]
        $Filter,

        [Parameter(ParameterSetName = 'Get all')]
        [ValidateSet('PENDING_DEPLOYMENT', 'DEPLOYED', 'PENDING_REVOCATION', 'REVOKED')]
        [string]
        $KeyStatus,

        [Parameter(ParameterSetName = 'Get all')]
        [int]
        $Page,

        [Parameter(ParameterSetName = 'Get all')]
        [int]
        $PageSize,

        [Parameter(ParameterSetName = 'Get all')]
        [ValidateSet('asc', 'desc')]
        [string]
        $SortDirection,

        [Parameter(ParameterSetName = 'Get all')]
        [ValidateSet('createdAt', 'id', 'label', 'description')]
        [string]
        $SortColumn,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    process {
        if ($null -ne $PSBoundParameters.KeyID) {
            $Path = "/apikey-manager-api/v2/keys/$KeyID"
        }
        else {
            $Path = "/apikey-manager-api/v2/keys"
        }

        $QueryParameters = @{
            'collectionId' = $PSBoundParameters.CollectionID
            'filter'       = $Filter
            'keyType'      = $KeyType
            'page'         = $PSBoundParameters.Page
            'pageSize'     = $PSBoundParameters.PageSize
            'sortDirect'   = $SortDirection
            'sortColumn'   = $SortColumn
        }
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'GET'
            'QueryParameters'  = $QueryParameters
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        if ($null -ne $PSBoundParameters.KeyID) {
            return $Response.Body
        }
        else {
            return $Response.Body.keys
        }
    }
}


function Get-APIKeyCollection {
    [CmdletBinding()]
    Param(
        [Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64]
        $CollectionID,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    Process {
        if ($CollectionID) {
            $Path = "/apikey-manager-api/v2/collections/$CollectionID"
        }
        else {
            $Path = "/apikey-manager-api/v2/collections"
        }
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'GET'
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        if ($CollectionID) {
            return $Response.Body
        }
        else {
            return $Response.Body.collections
        }
    }
}


function Get-APIKeyCollectionACL {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64]
        $CollectionID,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    process {
        $Path = "/apikey-manager-api/v2/collections/$CollectionID/acl-entries"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'GET'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }
}


function Get-APIKeyCollectionEndpoints {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64]
        $CollectionID,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    Process {
        $Path = "/apikey-manager-api/v2/collections/$CollectionID/endpoints"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'GET'
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body.endpoints
    }
}


function Get-APIKeyCollectionQuota {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64]
        $CollectionID,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    Process {
        $Path = "/apikey-manager-api/v2/collections/$CollectionID/quota-config"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'GET'
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }
}


function Get-APITag {
    [CmdletBinding()]
    Param(
        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    $Path = "/apikey-manager-api/v2/tags"
    $RequestParams = @{
        'Path'             = $Path
        'Method'           = 'GET'
        'EdgeRCFile'       = $EdgeRCFile
        'Section'          = $Section
        'AccountSwitchKey' = $AccountSwitchKey
        'Debug'            = ($PSBoundParameters.Debug -eq $true)
    }
    # Make Request
    $Response = Invoke-AkamaiRequest @RequestParams
    return $Response.Body.tags
}


function Get-APIThrottlingCounter {
    [CmdletBinding()]
    Param(
        [Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64]
        $CounterID,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    Process {
        if ($CounterID) {
            $Path = "/apikey-manager-api/v2/counters/$CounterID"
        }
        else {
            $Path = "/apikey-manager-api/v2/counters"
        }
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'GET'
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        if ($CounterID) {
            return $Response.Body
        }
        else {
            return $Response.Body.throttlingCounters
        }
    }
}


function Get-APIThrottlingCounterEndpoints {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64]
        $CounterID,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    Process {
        $Path = "/apikey-manager-api/v2/counters/$CounterID/endpoints"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'GET'
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body.endpoints
    }
}


function Get-APIThrottlingCounterKeyCollections {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64]
        $CounterID,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    Process {
        $Path = "/apikey-manager-api/v2/counters/$CounterID/key-collections"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'GET'
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body.collections
    }
}


function Get-APIThrottlingCounterKeys {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64]
        $CounterID,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    Process {
        $Path = "/apikey-manager-api/v2/counters/$CounterID/keys"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'GET'
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body.keys
    }
}


function Import-APIKey {
    [CmdletBinding(DefaultParameterSetName = 'Body')]
    Param(
        [Parameter(Mandatory)]
        [int64]
        $CollectionID,

        [Parameter(Mandatory, ParameterSetName = 'Attributes')]
        [string]
        $KeyValue,

        [Parameter(ParameterSetName = 'Attributes')]
        [string]
        $KeyDescription,

        [Parameter(ParameterSetName = 'Attributes')]
        [string]
        $Label,

        [Parameter(ParameterSetName = 'Attributes')]
        [string[]]
        $Tags,

        [Parameter(ParameterSetName = 'File')]
        [string]
        $InputFile,

        [Parameter(ParameterSetName = 'Body', ValueFromPipeline, Mandatory)]
        $Body,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {
        $CollatedKeys = New-Object -TypeName System.Collections.Generic.List['object']
    }

    process {
        if ($Body -isnot 'String') {
            $CollatedKeys.Add($Body)
        }
    }

    end {
        $Path = "/apikey-manager-api/v2/collections/$CollectionID/import-keys"
        if ($PSCmdlet.ParameterSetName -eq 'Attributes') {
            $Body = @(
                @{ 'keyValue' = $KeyValue }
            )

            if ($KeyDescription) {
                $Body[0]['keyDescription'] = $KeyDescription
            }
            if ($Label) {
                $Body[0]['label'] = $Label
            }
            if ($Tags) {
                $Body[0]['tags'] = $Tags
            }
        }
        elseif ($PSCmdlet.ParameterSetName -eq 'File') {
            $Body = Get-Content $InputFile -Raw
            if ($InputFile.EndsWith('.json')) {
                # Handle single item file by wrapping in array
                if (-not ($Body -match '^[\s]*\[[\s\S]*\][\s]*$')) {
                    $Body = "[$Body]"
                }
            }
            elseif ($InputFile.EndsWith('.csv')) {
                $AdditionalHeaders = @{
                    'Content-Type' = 'text/csv'
                }
            }
            elseif ($InputFile.EndsWith('.xml')) {
                $AdditionalHeaders = @{
                    'Content-Type' = 'application/xml'
                }
            }
            elseif (-not $InputFile.EndsWith('.json')) {
                throw "Only csv, xml and json files are supported."
            }
        }
        elseif ($CollatedKeys.Count -gt 0) {
            $Body = $CollatedKeys
        }
        $RequestParams = @{
            'Path'              = $Path
            'Method'            = 'POST'
            'AdditionalHeaders' = $AdditionalHeaders
            'Body'              = $Body
            'EdgeRCFile'        = $EdgeRCFile
            'Section'           = $Section
            'AccountSwitchKey'  = $AccountSwitchKey
            'Debug'             = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body.Keys
    }

}


function Move-APIKey {
    [CmdletBinding(DefaultParameterSetName = 'Existing')]
    Param(
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64[]]
        $KeyIds,

        [Parameter(Mandatory, ParameterSetName = 'Existing')]
        [int]
        $DestinationCollectionID,

        [Parameter(Mandatory, ParameterSetName = 'New')]
        [string]
        $NewCollectionName,

        [Parameter(ParameterSetName = 'New')]
        [string]
        $NewCollectionDescription,

        [Parameter(Mandatory, ParameterSetName = 'New')]
        [string]
        $ContractID,

        [Parameter(Mandatory, ParameterSetName = 'New')]
        [int]
        $GroupID,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {
        $CollatedKeys = New-Object -TypeName System.Collections.Generic.List['int']
    }

    process {
        foreach ($KeyID in $KeyIds) {
            $CollatedKeys.Add($KeyId)
        }
    }

    end {
        $Path = "/apikey-manager-api/v2/keys/move"
        $Body = @{
            'keyIds' = $KeyIDs
        }
        if ($PSCmdlet.ParameterSetName -eq 'Existing') {
            $Body['destinationCollectionId'] = $DestinationCollectionID
        }
        else {
            $Body['newCollectionName'] = $NewCollectionName
            $Body['newCollectionContractId'] = $ContractID
            $Body['newCollectionGroupId'] = $GroupID
            if ($NewCollectionDescription) {
                $Body['newCollectionDescription'] = $NewCollectionDescription
            }
        }
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'POST'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body

    }

}


function New-APIKey {
    [CmdletBinding(DefaultParameterSetName = 'Key count')]
    Param(
        [Parameter(Mandatory, ParameterSetName = 'Key values', ValueFromPipelineByPropertyName)]
        [Parameter(Mandatory, ParameterSetName = 'Key count', ValueFromPipelineByPropertyName)]
        [int64]
        $CollectionID,

        [Parameter(ParameterSetName = 'Key values', Mandatory)]
        [string[]]
        $KeyValues,

        [Parameter(ParameterSetName = 'Key count', Mandatory)]
        [int]
        $Count,

        [Parameter(ParameterSetName = 'Key values')]
        [Parameter(ParameterSetName = 'Key count')]
        [string]
        $KeyDescription,

        [Parameter(ParameterSetName = 'Key values')]
        [Parameter(ParameterSetName = 'Key count')]
        [switch]
        $IncrementLabel,

        [Parameter(ParameterSetName = 'Key values')]
        [Parameter(ParameterSetName = 'Key count')]
        [string]
        $Label,

        [Parameter(ParameterSetName = 'Key values')]
        [Parameter(ParameterSetName = 'Key count')]
        [string[]]
        $Tags,

        [Parameter(Mandatory, ParameterSetName = 'Body', ValueFromPipeline)]
        $Body,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    process {
        if ($PSCmdlet.ParameterSetName.Contains('Key')) {
            $Body = @{
                'collectionId'   = $CollectionID
                'incrementLabel' = $IncrementLabel.IsPresent
            }

            # Select only one of the 2 options, which should be mutually exclusive anyway
            if ($KeyValues) {
                $Body['keyValues'] = $KeyValues
            }
            elseif ($Count) {
                $Body['count'] = $Count
            }

            if ($KeyDescription) {
                $Body['keyDescription'] = $KeyDescription
            }
            if ($Label) {
                $Body['label'] = $Label
            }
            if ($Tags) {
                $Body['tags'] = $Tags
            }
        }
        else {
            $Body = Get-BodyObject -Source $Body
        }

        if ($null -ne $Body.keyValues) {
            $Path = "/apikey-manager-api/v2/keys"
        }
        else {
            $Path = "/apikey-manager-api/v2/keys/generate"
        }
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'POST'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body.keys
    }
}


function New-APIKeyCollection {
    [CmdletBinding(DefaultParameterSetName = 'Body')]
    Param(
        [Parameter(ParameterSetName = 'Attributes', Mandatory, ValueFromPipelineByPropertyName)]
        [string]
        $CollectionName,

        [Parameter(ParameterSetName = 'Attributes')]
        [string]
        $CollectionDescription,

        [Parameter(ParameterSetName = 'Attributes', Mandatory)]
        [string]
        $ContractID,

        [Parameter(ParameterSetName = 'Attributes', Mandatory)]
        [int]
        $GroupID,

        [Parameter(Mandatory, ValueFromPipeline, ParameterSetName = 'Body')]
        $Body,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {}

    process {
        $Path = "/apikey-manager-api/v2/collections"
        if ($PSCmdlet.ParameterSetName -eq 'Attributes') {
            $Body = @{
                'collectionName'        = $CollectionName
                'collectionDescription' = $CollectionDescription
                'contractId'            = $ContractID
                'groupId'               = $GroupID
            }
        }
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'POST'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }

    end {}
}


function New-APIThrottlingCounter {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory)]
        $Body,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {}

    process {
        $Path = "/apikey-manager-api/v2/counters"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'POST'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }

    end {}

}


function Remove-APIKeyCollection {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64]
        $CollectionID,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    process {
        $Path = "/apikey-manager-api/v2/collections/$CollectionID"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'DELETE'
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }
}


function Remove-APIKeyFromCollection {
    [CmdletBinding(DefaultParameterSetName = 'Attributes')]
    param(
        [Parameter(ParameterSetName = 'Attributes', Mandatory)]
        [int64[]]
        $CollectionIDs,

        [Parameter(ParameterSetName = 'Attributes', Mandatory)]
        [int64[]]
        $KeyIDs,

        [Parameter(ParameterSetName = 'Body', ValueFromPipeline, Mandatory)]
        $Body,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    process {
        $Path = "/apikey-manager-api/v2/keys/unassign"
        if ($PSCmdlet.ParameterSetName -eq 'Attributes') {
            $Body = @{
                'collectionIds' = $CollectionIDs
                'keyIds'        = $KeyIDs
            }
        }
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'POST'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body.keys
    }
}


function Remove-APIThrottlingCounter {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [int64]
        $CounterID,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    process {
        $Path = "/apikey-manager-api/v2/counters/$CounterID"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'DELETE'
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }
}


function Reset-APIKeyCollectionQuota {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)]
        [int64]
        $CollectionID,

        [Parameter(Mandatory, ValueFromPipeline)]
        [int64[]]
        $KeyIDs,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {
        $CollatedKeys = New-Object -TypeName System.Collections.Generic.List['int64']
    }

    process {
        foreach ($KeyID in $KeyIDs) {
            $CollatedKeys.Add($KeyID)
        }
    }

    end {
        $Path = "/apikey-manager-api/v2/collections/$CollectionID/quota-reset"
        $Body = @{
            'keyIds' = $CollatedKeys
        }
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'POST'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }
}


function Reset-APIKeyQuota {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipeline)]
        [int64[]]
        $KeyIDs,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {
        $CollatedKeys = New-Object -TypeName System.Collections.Generic.List['int']
    }

    process {
        foreach ($KeyID in $KeyIDs) {
            $CollatedKeys.Add($KeyID)
        }
    }

    end {
        $Path = "/apikey-manager-api/v2/keys/quota-reset"
        $Body = @{
            'keyIds' = $CollatedKeys
        }
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'POST'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }
}


function Restore-APIKey {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipeline)]
        [int64[]]
        $KeyIDs,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {
        $CollatedKeys = New-Object -TypeName System.Collections.Generic.List['int']
    }

    process {
        foreach ($KeyID in $KeyIDs) {
            $CollatedKeys.Add($KeyID)
        }
    }

    end {
        $Path = "/apikey-manager-api/v2/keys/restore"
        $Body = @{
            'keyIds' = $CollatedKeys
        }
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'POST'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }
}


function Revoke-APIKey {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipeline)]
        [int64[]]
        $KeyIDs,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {
        $CollatedKeys = New-Object -TypeName System.Collections.Generic.List['int']
    }

    process {
        foreach ($KeyID in $KeyIDs) {
            $CollatedKeys.Add($KeyID)
        }
    }

    end {
        $Path = "/apikey-manager-api/v2/keys/revoke"
        $Body = @{
            'keyIds' = $CollatedKeys
        }
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'POST'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }
}


function Set-APIKey {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [int64]
        $KeyID,

        [Parameter(Mandatory, ValueFromPipeline)]
        $Body,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {}

    process {
        $Path = "/apikey-manager-api/v2/keys/$KeyID"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'PUT'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }

    end {}

}


function Set-APIKeyCollection {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [int64]
        $CollectionID,

        [Parameter(Mandatory, ValueFromPipeline)]
        $Body,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {}

    process {
        $Path = "/apikey-manager-api/v2/collections/$CollectionID"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'PUT'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }

    end {}
}


function Set-APIKeyCollectionACL {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory)]
        [int64]
        $CollectionID,

        [Parameter(Mandatory, ValueFromPipeline)]
        $Body,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {}

    process {
        $Path = "/apikey-manager-api/v2/collections/$CollectionID/acl-entries"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'PUT'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }

    end {}
}


function Set-APIKeyCollectionQuota {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory)]
        [int64]
        $CollectionID,

        [Parameter(Mandatory, ValueFromPipeline)]
        $Body,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {}

    process {
        $Path = "/apikey-manager-api/v2/collections/$CollectionID/quota-config"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'PUT'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }

    end {}

}


function Set-APIThrottlingCounter {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [Alias('ThrottlingCounterID')]
        [int64]
        $CounterID,

        [Parameter(Mandatory, ValueFromPipeline)]
        $Body,

        [Parameter()]
        [string]
        $EdgeRCFile,

        [Parameter()]
        [string]
        $Section,

        [Parameter()]
        [string]
        $AccountSwitchKey
    )

    begin {}

    process {
        $Path = "/apikey-manager-api/v2/counters/$CounterID"
        $RequestParams = @{
            'Path'             = $Path
            'Method'           = 'PUT'
            'Body'             = $Body
            'EdgeRCFile'       = $EdgeRCFile
            'Section'          = $Section
            'AccountSwitchKey' = $AccountSwitchKey
            'Debug'            = ($PSBoundParameters.Debug -eq $true)
        }
        # Make Request
        $Response = Invoke-AkamaiRequest @RequestParams
        return $Response.Body
    }

    end {}

}



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