Skip to content

Commit

Permalink
updated logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jformacek committed Jul 29, 2024
1 parent ef80e9a commit f0b981f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Module/ExoHelper/ExoHelper.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ PrivateData = @{
# ReleaseNotes = ''

# Prerelease string of this module
Prerelease = 'beta2'
Prerelease = 'beta3'

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
Expand Down
19 changes: 17 additions & 2 deletions Module/ExoHelper/ExoHelper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ This command creates connection for IPPS REST API, retrieves list of sensitivity
#1000 is a minimum, and min increment is 1000
$ResultSize = [int]::MaxValue,

[Parameter()]
[int]
#Max results to return in single request
#Default is 100
$PageSize = 100,

[switch]
#If we want to write any warnings returned by EXO REST API
$ShowWarnings,
Expand All @@ -227,7 +233,16 @@ This command creates connection for IPPS REST API, retrieves list of sensitivity
begin
{
$body = @{}
$batchSize = 100
if($PageSize -gt 1000)
{
$batchSize = 1000
}
if($PageSize -le 0)
{
$batchSize = 100
}
$batchSize = $pageSize

$uri = $Connection.ConnectionUri
if($PropertiesToLoad.Count -gt 0)
{
Expand Down Expand Up @@ -271,7 +286,7 @@ This command creates connection for IPPS REST API, retrieves list of sensitivity
$headers['client-request-id'] = [Guid]::NewGuid().ToString()
#provide up to date token for each request of commands returning paged results that may take long to complete
$headers['Authorization'] = (Get-ExoToken -Connection $Connection).CreateAuthorizationHeader()
Write-Verbose "RequestId: $($headers['client-request-id'])`tUri: $pageUri"
Write-Verbose "$([DateTime]::UtcNow.ToString('o'))`tResults:$resultsRetrieved`tRequestId: $($headers['client-request-id'])`tUri: $pageUri"
$splat = @{
Uri = $pageUri
Method = 'Post'
Expand Down

0 comments on commit f0b981f

Please sign in to comment.