Api/TorizonPlatformAPIUpdatesApi.ps1
# # Torizon OTA # This API is rate limited and will return the following headers for each API call. - X-RateLimit-Limit - The total number of requests allowed within a time period - X-RateLimit-Remaining - The total number of requests still allowed until the end of the rate limiting period - X-RateLimit-Reset - The number of seconds until the limit is fully reset In addition, if an API client is rate limited, it will receive a HTTP 420 response with the following header: - Retry-After - The number of seconds to wait until this request is allowed # Version: 2.0-Beta # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS List all existing lockboxes on the repository, and their detailed contents .DESCRIPTION No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS System.Collections.Hashtable #> function Get-TorizonPlatformAPILockboxDetails { [CmdletBinding()] Param ( [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPILockboxDetails' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/lockbox-details' if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "System.Collections.Hashtable" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS List all existing lockboxes on the repository .DESCRIPTION No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS String[] #> function Get-TorizonPlatformAPILockboxes { [CmdletBinding()] Param ( [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPILockboxes' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/lockboxes' if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "String[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get the raw Uptane metadata for a lockbox .DESCRIPTION No description available. .PARAMETER LockboxName No description available. .PARAMETER Version No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS JsonSignedPayload #> function Get-TorizonPlatformAPILockboxesLockboxName { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${LockboxName}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Version}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-TorizonPlatformAPILockboxesLockboxName' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/lockboxes/{lockbox_name}' if (!$LockboxName) { throw "Error! The required parameter `LockboxName` missing when calling getLockboxesLockboxName." } $LocalVarUri = $LocalVarUri.replace('{lockbox_name}', [System.Web.HTTPUtility]::UrlEncode($LockboxName)) if ($Version) { $LocalVarQueryParameters['version'] = $Version } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "JsonSignedPayload" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Cancel a pending update for one or more devices .DESCRIPTION No description available. .PARAMETER RequestBody No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS String[] #> function Invoke-TorizonPlatformAPIPatchUpdates { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String[]] ${RequestBody}, [Switch] $WithHttpInfo ) Process { 'Calling method: Invoke-TorizonPlatformAPIPatchUpdates' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/updates' if ($LocalVarContentTypes[0] -eq 'application/octet-stream') { $LocalVarBodyParameter = [System.IO.File]::ReadAllBytes($RequestBody.FullName) } else { $LocalVarBodyParameter = $RequestBody | ConvertTo-Json -Depth 100 } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'PATCH' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "String[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Define a new lockbox, or update an existing one .DESCRIPTION No description available. .PARAMETER LockboxName No description available. .PARAMETER CreateLockboxRequest No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS None #> function Submit-TorizonPlatformAPILockboxesLockboxName { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${LockboxName}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${CreateLockboxRequest}, [Switch] $WithHttpInfo ) Process { 'Calling method: Submit-TorizonPlatformAPILockboxesLockboxName' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/lockboxes/{lockbox_name}' if (!$LockboxName) { throw "Error! The required parameter `LockboxName` missing when calling postLockboxesLockboxName." } $LocalVarUri = $LocalVarUri.replace('{lockbox_name}', [System.Web.HTTPUtility]::UrlEncode($LockboxName)) if (!$CreateLockboxRequest) { throw "Error! The required parameter `CreateLockboxRequest` missing when calling postLockboxesLockboxName." } if ($LocalVarContentTypes[0] -eq 'application/octet-stream') { $LocalVarBodyParameter = [System.IO.File]::ReadAllBytes($CreateLockboxRequest.FullName) } else { $LocalVarBodyParameter = $CreateLockboxRequest | ConvertTo-Json -Depth 100 } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Launch an update to one or more devices or fleets .DESCRIPTION No description available. .PARAMETER UpdateRequest No description available. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS UpdateCreateResult #> function Submit-TorizonPlatformAPIUpdates { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${UpdateRequest}, [Switch] $WithHttpInfo ) Process { 'Calling method: Submit-TorizonPlatformAPIUpdates' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-TorizonPlatformAPIConfiguration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/updates' if (!$UpdateRequest) { throw "Error! The required parameter `UpdateRequest` missing when calling postUpdates." } if ($LocalVarContentTypes[0] -eq 'application/octet-stream') { $LocalVarBodyParameter = [System.IO.File]::ReadAllBytes($UpdateRequest.FullName) } else { $LocalVarBodyParameter = $UpdateRequest | ConvertTo-Json -Depth 100 } if ($Configuration["AccessToken"]) { $LocalVarHeaderParameters['Authorization'] = "Bearer " + $Configuration["AccessToken"] Write-Verbose ("Using Bearer authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-TorizonPlatformAPIApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "UpdateCreateResult" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } |