Api/CustomPasswordInstructionsApi.ps1
|
# # Identity Security Cloud API - Custom Password Instructions # 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 Create custom password instructions .DESCRIPTION This API creates the custom password instructions for the specified page ID. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER Custompasswordinstruction 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 Custompasswordinstruction #> function New-CustomPasswordInstructionsV1 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${Custompasswordinstruction}, [Switch] $WithHttpInfo ) Process { 'Calling method: New-CustomPasswordInstructionsV1' | 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 = '/custom-password-instructions/v1' if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling createCustomPasswordInstructionsV1." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if (!$Custompasswordinstruction) { throw "Error! The required parameter `Custompasswordinstruction` missing when calling createCustomPasswordInstructionsV1." } if ($LocalVarContentTypes.Contains('application/json-patch+json') -or ($Custompasswordinstruction -is [array])) { $LocalVarBodyParameter = $Custompasswordinstruction | ConvertTo-Json -AsArray -Depth 100 } else { $LocalVarBodyParameter = $Custompasswordinstruction | 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 "Custompasswordinstruction" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Delete custom password instructions by page id .DESCRIPTION This API delete the custom password instructions for the specified page ID. .PARAMETER PageId The page ID of custom password instructions to delete. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER Locale The locale for the custom instructions, a BCP47 language tag. The default value is \""default\"". .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 Remove-CustomPasswordInstructionsV1 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [ValidateSet("change-password:enter-password", "change-password:finish", "flow-selection:select", "forget-username:user-email", "mfa:enter-code", "mfa:enter-kba", "mfa:select", "reset-password:enter-password", "reset-password:enter-username", "reset-password:finish", "unlock-account:enter-username", "unlock-account:finish")] [String] ${PageId}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Locale}, [Switch] $WithHttpInfo ) Process { 'Calling method: Remove-CustomPasswordInstructionsV1' | 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 = '/custom-password-instructions/v1/{pageId}' if (!$PageId) { throw "Error! The required parameter `PageId` missing when calling deleteCustomPasswordInstructionsV1." } $LocalVarUri = $LocalVarUri.replace('{pageId}', [System.Web.HTTPUtility]::UrlEncode($PageId)) if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling deleteCustomPasswordInstructionsV1." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if ($Locale) { $LocalVarQueryParameters['locale'] = $Locale } $LocalVarResult = Invoke-ApiClient -Method 'DELETE' ` -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 Get custom password instructions by page id .DESCRIPTION This API returns the custom password instructions for the specified page ID. .PARAMETER PageId The page ID of custom password instructions to query. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER Locale The locale for the custom instructions, a BCP47 language tag. The default value is \""default\"". .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS Custompasswordinstruction #> function Get-CustomPasswordInstructionsV1 { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [ValidateSet("change-password:enter-password", "change-password:finish", "flow-selection:select", "forget-username:user-email", "mfa:enter-code", "mfa:enter-kba", "mfa:select", "reset-password:enter-password", "reset-password:enter-username", "reset-password:finish", "unlock-account:enter-username", "unlock-account:finish")] [String] ${PageId}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Locale}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-CustomPasswordInstructionsV1' | 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 = '/custom-password-instructions/v1/{pageId}' if (!$PageId) { throw "Error! The required parameter `PageId` missing when calling getCustomPasswordInstructionsV1." } $LocalVarUri = $LocalVarUri.replace('{pageId}', [System.Web.HTTPUtility]::UrlEncode($PageId)) if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling getCustomPasswordInstructionsV1." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if ($Locale) { $LocalVarQueryParameters['locale'] = $Locale } $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "Custompasswordinstruction" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } |