Provide a global built-in solution, similar to our SDKs, where devs configure MaxRetries and RequestTimeout, so all 429 requests are internally retried using default calculation based on retry headers.
Description
The Okta.PowerShell module uses a built-in retry strategy to automatically retry on 429 errors.
You can configure the following options when using the built-in retry strategy:
Configuration Option
Description
RequestTimeout
The waiting time in milliseconds for a request to be resolved by the client. Less than or equal to 0 means "no timeout". The default value is $null (None).
MaxRetries
The number of times to retry.
Usage
$Config = Get-OktaConfiguration
$Config.MaxRetries = 2
$Config.RequestTimeout = 6000
# Invoke your commands as usual
$Result = Invoke-OktaListApplications
What changed?
Deleted tests/Models as we don't use it for now and make noise
Added OktaRetryApi.ps1, updated OktaApiClient.ps1, updated templates that impact all files, added tests.
Updated readme
Files of interest: Client/OktaConfiguration.ps1, Client/OktaRetryApi.ps1, Private/OktaApiClient, tests/internal/OktaRetyApi.Tests.ps1, tests/internal/OktaApiClient.Tests.ps1, README
Feature
Provide a global built-in solution, similar to our SDKs, where devs configure MaxRetries and RequestTimeout, so all 429 requests are internally retried using default calculation based on retry headers.
Description
The Okta.PowerShell module uses a built-in retry strategy to automatically retry on 429 errors.
You can configure the following options when using the built-in retry strategy:
$null
(None).Usage
What changed?
Client/OktaConfiguration.ps1
,Client/OktaRetryApi.ps1
,Private/OktaApiClient
,tests/internal/OktaRetyApi.Tests.ps1
,tests/internal/OktaApiClient.Tests.ps1
, README