Api/V2026MachineAccountDeletionApprovalConfigApi.ps1
|
# # Identity Security Cloud v2026 API # 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: v2026 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS Machine Account Deletion Approval Config .DESCRIPTION Retrieves the machine account deletion approval configuration for a specific source. This endpoint returns details about the approval requirements, approvers, and comment settings that govern the deletion of machine accounts associated with the given source ID. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER SourceId source id. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS AccountDeleteConfigDto #> function Get-V2026MachineAccountDeletionApprovalConfigBySource { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${SourceId}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-V2026MachineAccountDeletionApprovalConfigBySource' | 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 = '/sources/{sourceId}/approval-config/machine-account-delete' if (!$SourceId) { throw "Error! The required parameter `SourceId` missing when calling getMachineAccountDeletionApprovalConfigBySource." } $LocalVarUri = $LocalVarUri.replace('{sourceId}', [System.Web.HTTPUtility]::UrlEncode($SourceId)) if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling getMachineAccountDeletionApprovalConfigBySource." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental $LocalVarResult = Invoke-V2026ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "AccountDeleteConfigDto" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Machine Account Deletion Approval Config .DESCRIPTION Use this endpoint to update the machine account deletion approval configuration for a specific source. The update is performed using a JSON Patch payload, which allows partial modifications to the approval config. This operation is typically used to change approval requirements, approvers, or comments settings for machine account deletion. The endpoint expects the source ID as a path parameter and a valid JSON Patch array in the request body. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER SourceId machine account source ID. .PARAMETER JsonPatchOperation The JSONPatch payload used to update the object. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS AccountDeleteConfigDto #> function Update-V2026MachineAccountDeletionApprovalConfig { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${SourceId}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject[]] ${JsonPatchOperation}, [Switch] $WithHttpInfo ) Process { 'Calling method: Update-V2026MachineAccountDeletionApprovalConfig' | 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-patch+json') $LocalVarUri = '/sources/{sourceId}/approval-config/machine-account-delete' if (!$SourceId) { throw "Error! The required parameter `SourceId` missing when calling updateMachineAccountDeletionApprovalConfig." } $LocalVarUri = $LocalVarUri.replace('{sourceId}', [System.Web.HTTPUtility]::UrlEncode($SourceId)) if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling updateMachineAccountDeletionApprovalConfig." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if (!$JsonPatchOperation) { throw "Error! The required parameter `JsonPatchOperation` missing when calling updateMachineAccountDeletionApprovalConfig." } if ($LocalVarContentTypes.Contains('application/json-patch+json') -or ($JsonPatchOperation -is [array])) { $LocalVarBodyParameter = $JsonPatchOperation | ConvertTo-Json -AsArray -Depth 100 } else { $LocalVarBodyParameter = $JsonPatchOperation | 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-V2026ApiClient -Method 'PATCH' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "AccountDeleteConfigDto" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } |