jit-activations/src/PSSailpoint.JitActivations/Api/JITActivationsApi.ps1
|
# # Identity Security Cloud API - JIT Activations # Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs. # Version: v1 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS Get JIT activation frictions .DESCRIPTION Returns evaluated frictions for a JIT Privileged (JIT P) activation. Requires OAuth scope **idn:jit-activation-workflow:activate** or **idn:jit-activation-workflow:manage**. The JWT identity id must match the activation identity. Returns HTTP 403 when **PSPM_JIT_ACCESS_ACTIVATION** or **PSPM_JIT_ACCESS_ACTIVATION_15** is disabled. Returns HTTP 404 when the activation does not exist. .PARAMETER ActivationId Identifier of the activation. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS JITActivationFrictionsResponse #> function Get-JitActivationFrictionsV1 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${ActivationId}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Switch] $WithHttpInfo ) Process { 'Calling method: Get-JitActivationFrictionsV1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/jit-activations/v1/{activationId}/frictions' if (!$ActivationId) { throw "Error! The required parameter `ActivationId` missing when calling getJitActivationFrictionsV1." } $LocalVarUri = $LocalVarUri.replace('{activationId}', [System.Web.HTTPUtility]::UrlEncode($ActivationId)) if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling getJitActivationFrictionsV1." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "JITActivationFrictionsResponse" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS List JIT activation history (self) .DESCRIPTION Returns JIT activation history records for the authenticated identity only. This is the self-service view - results are automatically scoped to the calling identity. Requires `idn:jit-activation-history-self:read`. Returns HTTP 403 when the `PSPM_858_JIT_ACCESS_ACTIVATION_HISTORY_SEARCH` feature flag is disabled. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER Limit Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Offset Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Count If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Sorters Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **activationInitiated, provisionCompleted, status** Default sort is **-activationInitiated** (newest first). .PARAMETER SearchAfter Used to begin the search window at the values specified. This parameter consists of the last values of the sorted fields in the current record set. searchAfter length must match the number of sorters. Used to paginate beyond the offset limit of 10,000. It is recommended to always include the ID of the object in addition to any other sort fields to ensure no duplicate results while paging. For example, if sorting by activationInitiated you will also want to include ID: searchAfter=2026-07-08T14:33:52.029Z,367fb802-1026-1835-a619-11a56e4c5be3&sorters=activationInitiated,id .PARAMETER Filters Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **entitlementId**: *eq, in* **sourceId**: *eq* **connectionId**: *eq* **status**: *eq, in* **activationInitiated**: *gt, lt, ge, le* **policyFrictionOutcome**: *eq, in* .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS Jitactivationhistorydocument[] #> function Get-JitActivationHistoryForCurrentIdentityV1 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Limit}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Offset}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Boolean]] ${Count}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Sorters}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${SearchAfter}, [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Filters}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-JitActivationHistoryForCurrentIdentityV1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/jit-activation-history/v1/current-identity' if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling listJitActivationHistoryForCurrentIdentityV1." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if ($Limit) { $LocalVarQueryParameters['limit'] = $Limit } if ($Offset) { $LocalVarQueryParameters['offset'] = $Offset } if ($Count) { $LocalVarQueryParameters['count'] = $Count } if ($Sorters) { $LocalVarQueryParameters['sorters'] = $Sorters } if ($SearchAfter) { $LocalVarQueryParameters['searchAfter'] = $SearchAfter } if ($Filters) { $LocalVarQueryParameters['filters'] = $Filters } $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "Jitactivationhistorydocument[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS List JIT activation history (admin) .DESCRIPTION Returns JIT activation history records for the tenant. This is the admin/operator view - it returns activations across all identities in the tenant. Requires `idn:jit-activation-history:read`. Returns HTTP 403 when the `PSPM_858_JIT_ACCESS_ACTIVATION_HISTORY_SEARCH` feature flag is disabled. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER Limit Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Offset Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Count If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Sorters Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **activationInitiated, provisionCompleted, status** Default sort is **-activationInitiated** (newest first). .PARAMETER SearchAfter Used to begin the search window at the values specified. This parameter consists of the last values of the sorted fields in the current record set. searchAfter length must match the number of sorters. Used to paginate beyond the offset limit of 10,000. It is recommended to always include the ID of the object in addition to any other sort fields to ensure no duplicate results while paging. For example, if sorting by activationInitiated you will also want to include ID: searchAfter=2026-07-08T14:33:52.029Z,367fb802-1026-1835-a619-11a56e4c5be3&sorters=activationInitiated,id .PARAMETER Filters Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **identityId**: *eq, in* **entitlementId**: *eq, in* **sourceId**: *eq* **connectionId**: *eq* **status**: *eq, in* **activationInitiated**: *gt, lt, ge, le* **policyFrictionOutcome**: *eq, in* .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS Jitactivationhistorydocument[] #> function Get-JitActivationHistoryV1 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Limit}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Offset}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Boolean]] ${Count}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Sorters}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${SearchAfter}, [Parameter(Position = 6, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Filters}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-JitActivationHistoryV1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/jit-activation-history/v1' if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling listJitActivationHistoryV1." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if ($Limit) { $LocalVarQueryParameters['limit'] = $Limit } if ($Offset) { $LocalVarQueryParameters['offset'] = $Offset } if ($Count) { $LocalVarQueryParameters['count'] = $Count } if ($Sorters) { $LocalVarQueryParameters['sorters'] = $Sorters } if ($SearchAfter) { $LocalVarQueryParameters['searchAfter'] = $SearchAfter } if ($Filters) { $LocalVarQueryParameters['filters'] = $Filters } $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "Jitactivationhistorydocument[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Submit JIT activation friction .DESCRIPTION Submits the current friction step for a JIT Privileged (JIT P) activation. Requires OAuth scope **idn:jit-activation-workflow:activate** or **idn:jit-activation-workflow:manage**. The JWT identity id must match the activation identity. Returns HTTP 403 when **PSPM_JIT_ACCESS_ACTIVATION** or **PSPM_JIT_ACCESS_ACTIVATION_15** is disabled. Request bodies larger than 16 KB return HTTP 413. .PARAMETER ActivationId Identifier of the activation. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER JITActivationFrictionPatchRequest Submission for the current friction step. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS JITActivationFrictionsResponse #> function Update-JitActivationFrictionsV1 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${ActivationId}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${JITActivationFrictionPatchRequest}, [Switch] $WithHttpInfo ) Process { 'Calling method: Update-JitActivationFrictionsV1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/jit-activations/v1/{activationId}/frictions' if (!$ActivationId) { throw "Error! The required parameter `ActivationId` missing when calling patchJitActivationFrictionsV1." } $LocalVarUri = $LocalVarUri.replace('{activationId}', [System.Web.HTTPUtility]::UrlEncode($ActivationId)) if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling patchJitActivationFrictionsV1." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if (!$JITActivationFrictionPatchRequest) { throw "Error! The required parameter `JITActivationFrictionPatchRequest` missing when calling patchJitActivationFrictionsV1." } if ($LocalVarContentTypes.Contains('application/json-patch+json') -or ($JITActivationFrictionPatchRequest -is [array])) { $LocalVarBodyParameter = $JITActivationFrictionPatchRequest | ConvertTo-Json -AsArray -Depth 100 } else { $LocalVarBodyParameter = $JITActivationFrictionPatchRequest | ForEach-Object { # Get array of names of object properties that can be cast to boolean TRUE # PSObject.Properties - https://msdn.microsoft.com/en-us/library/system.management.automation.psobject.properties.aspx $NonEmptyProperties = $_.psobject.Properties | Where-Object {$null -ne $_.Value} | Select-Object -ExpandProperty Name # Convert object to JSON with only non-empty properties $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json -Depth 100 } } $LocalVarResult = Invoke-ApiClient -Method 'PATCH' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "JITActivationFrictionsResponse" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Start JIT activation workflow .DESCRIPTION Starts a JIT Privileged (JIT P) activation workflow for the given entitlement connection and duration. The service performs quick validation; the workflow performs additional validation. The response is returned with HTTP 202 Accepted while the workflow initializes. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER JitActivationActivateRequest 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 JitActivationActivateResponse #> function Start-ActivateWorkflowV1 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${JitActivationActivateRequest}, [Switch] $WithHttpInfo ) Process { 'Calling method: Start-ActivateWorkflowV1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/jit-activations/v1/activate' if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling startActivateWorkflowV1." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if (!$JitActivationActivateRequest) { throw "Error! The required parameter `JitActivationActivateRequest` missing when calling startActivateWorkflowV1." } if ($LocalVarContentTypes.Contains('application/json-patch+json') -or ($JitActivationActivateRequest -is [array])) { $LocalVarBodyParameter = $JitActivationActivateRequest | ConvertTo-Json -AsArray -Depth 100 } else { $LocalVarBodyParameter = $JitActivationActivateRequest | ForEach-Object { # Get array of names of object properties that can be cast to boolean TRUE # PSObject.Properties - https://msdn.microsoft.com/en-us/library/system.management.automation.psobject.properties.aspx $NonEmptyProperties = $_.psobject.Properties | Where-Object {$null -ne $_.Value} | Select-Object -ExpandProperty Name # Convert object to JSON with only non-empty properties $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json -Depth 100 } } $LocalVarResult = Invoke-ApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "JitActivationActivateResponse" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Deactivate JIT activation workflow .DESCRIPTION Sends a signal to a running JIT Privileged (JIT P) activation workflow to deactivate. This request cannot be applied to a workflow that does not exist or whose execution has already completed. The client receives an error response in those cases. The response is returned with HTTP 202 Accepted after the signal is sent. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER JitActivationDeactivateRequest 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 JitActivationDeactivateResponse #> function Start-DeactivateWorkflowV1 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${JitActivationDeactivateRequest}, [Switch] $WithHttpInfo ) Process { 'Calling method: Start-DeactivateWorkflowV1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/jit-activations/v1/deactivate' if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling startDeactivateWorkflowV1." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if (!$JitActivationDeactivateRequest) { throw "Error! The required parameter `JitActivationDeactivateRequest` missing when calling startDeactivateWorkflowV1." } if ($LocalVarContentTypes.Contains('application/json-patch+json') -or ($JitActivationDeactivateRequest -is [array])) { $LocalVarBodyParameter = $JitActivationDeactivateRequest | ConvertTo-Json -AsArray -Depth 100 } else { $LocalVarBodyParameter = $JitActivationDeactivateRequest | ForEach-Object { # Get array of names of object properties that can be cast to boolean TRUE # PSObject.Properties - https://msdn.microsoft.com/en-us/library/system.management.automation.psobject.properties.aspx $NonEmptyProperties = $_.psobject.Properties | Where-Object {$null -ne $_.Value} | Select-Object -ExpandProperty Name # Convert object to JSON with only non-empty properties $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json -Depth 100 } } $LocalVarResult = Invoke-ApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "JitActivationDeactivateResponse" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Extend JIT activation workflow .DESCRIPTION Sends a signal to a running JIT Privileged (JIT P) activation workflow to extend the activation period by the requested number of minutes. This request cannot be applied to a workflow that does not exist or whose execution has already completed. The client receives an error response in those cases. The response is returned with HTTP 202 Accepted after the signal is sent. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER JitActivationExtendRequest 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 JitActivationExtendResponse #> function Start-ExtendWorkflowV1 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${JitActivationExtendRequest}, [Switch] $WithHttpInfo ) Process { 'Calling method: Start-ExtendWorkflowV1' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json') $LocalVarUri = '/jit-activations/v1/extend' if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling startExtendWorkflowV1." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if (!$JitActivationExtendRequest) { throw "Error! The required parameter `JitActivationExtendRequest` missing when calling startExtendWorkflowV1." } if ($LocalVarContentTypes.Contains('application/json-patch+json') -or ($JitActivationExtendRequest -is [array])) { $LocalVarBodyParameter = $JitActivationExtendRequest | ConvertTo-Json -AsArray -Depth 100 } else { $LocalVarBodyParameter = $JitActivationExtendRequest | ForEach-Object { # Get array of names of object properties that can be cast to boolean TRUE # PSObject.Properties - https://msdn.microsoft.com/en-us/library/system.management.automation.psobject.properties.aspx $NonEmptyProperties = $_.psobject.Properties | Where-Object {$null -ne $_.Value} | Select-Object -ExpandProperty Name # Convert object to JSON with only non-empty properties $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json -Depth 100 } } $LocalVarResult = Invoke-ApiClient -Method 'POST' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "JitActivationExtendResponse" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } |