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.
Option | Description | Default |
---|---|---|
EnableErrorRetries | Retries 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 |
InitialErrorWait | The time to wait between retries. Value is in seconds. | 1 |
MaxErrorRetries | The number of times to retry an errored call. | 5 |
EnableRateLimitRetries | Retries 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 |
DisablePapiPrefixes | Removes the need to send and the return of ID prefixes when using the Akamai.Property submodule. | false |
EnableRateLimitWarnings | Notifies 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 |
RateLimitWarningPercentage | The percent of an endpoint's threshold at which to start sending you're approaching rate limits. | 90 |
EnableRecommendedActions | Provides troubleshooting information for common response errors. | false |
EnableDataCache | Stores Akamai asset IDs in memory for reuse. Works with:
Notes: | false |
Updated 9 days ago