Error handling and options

Set module options to manage server and rate limiting error impact, get troubleshooting information, and store Akamai asset IDs for reuse.

  • Get-AkamaiOptions. Shows your current options settings.
  • Set-AkamaiOptions. Updates or resets to default the settings on your options.
Get-AkamaiOptions
Set-AkamaiOptions -EnableErrorRetries $true -InitialErrorWait 2 -MaxErrorRetries 2
Set-AkamaiOptions -EnableRateLimitRetries
Set-AkamaiOptions -RestoreDefaults
Set-AkamaiOptions -EnableRateLimitWarnings -RateLimitWarningPercentage 95
Set-AkamaiOptions -DisablePapiPrefixes $true
Set-AkamaiOptions -EnableRecommendedActions $true
Set-AkamaiOptions -EnableDataCache $true

Options

Option parameters are set to the default unless you enable or adjust the values and stored at ~/.akamai-pwsh/options.json. Use the AkamaiOptionsPath in the Set-AkamaiOptions function to change the location.

OptionDescriptionDefault
EnableErrorRetriesRetries calls that returned a 500, 502, 503, or 504 error. The default iteration value is five. Use MaxErrorRetries to adjust that and InitialErrorWait to set the interval between tries.false
InitialErrorWaitThe time to wait between retries. Value is in seconds.1
MaxErrorRetriesThe number of times to retry an errored call.5
EnableRateLimitRetriesRetries 429 rate limit errors. The wait value returned in the response sets the retry interval.
Warning: Manual retries once you've reached the threshold restart wait time.
false
DisablePapiPrefixesRemoves the need to send and the return of ID prefixes when using the Akamai.Property submodule.false
EnableRateLimitWarningsNotifies you that you're reaching an endpoint's rate limit threshold. Value is a percent of the remaining allowable tries. Default is at 90 percent. Use RateLimitWarningPercentage to adjust when notifications start.false
RateLimitWarningPercentageThe percent of an endpoint's threshold at which to start sending you're approaching rate limits.90
EnableRecommendedActionsProvides troubleshooting information for common response errors.false
EnableDataCacheStores Akamai asset IDs in memory for reuse. Works with:
  • APIDefinitions
  • AppSec
  • ClientLists
  • EdgeWorkers
  • METS
  • MOKS
  • Property
Notes:
  • The cache is deleted when you close your shell or open a new session. It is not persistent.
  • Only names are currently supported
  • Use of latest in version parameters triggers a lookup to get the very latest.
  • You can clear the cache at any time by running `Clear-AkamaiDataCache
false