From 5dd8081a88c051ad16dc685b29307bacb9fd27d5 Mon Sep 17 00:00:00 2001 From: GitHub Action Bot Date: Tue, 2 Apr 2024 09:43:28 +0000 Subject: [PATCH] Automated build 'Automated commit 'ISCAIM-21767 - add remove account(s) docs (#1598)' by github action: 8520704082' powershell sdk: 8520712480 --- PSSailpoint/PSSailpoint.psd1 | 5 +- PSSailpoint/beta/README.md | 2 + PSSailpoint/beta/docs/BetaAccountsApi.md | 104 ++++++++++++ .../PSSailpointBeta/Api/BetaAccountsApi.ps1 | 148 ++++++++++++++++++ .../beta/tests/Api/BetaAccountsApi.Tests.ps1 | 16 ++ 5 files changed, 273 insertions(+), 2 deletions(-) diff --git a/PSSailpoint/PSSailpoint.psd1 b/PSSailpoint/PSSailpoint.psd1 index 06ccb0328..b4189b9f4 100644 --- a/PSSailpoint/PSSailpoint.psd1 +++ b/PSSailpoint/PSSailpoint.psd1 @@ -3,7 +3,7 @@ # # Generated by: Sailpoint Developer Relations # -# Generated on: 04/01/2024 +# Generated on: 04/02/2024 # @{ @@ -947,7 +947,8 @@ FunctionsToExport = 'New-AccessProfile', 'Remove-AccessProfile', 'Get-BetaAccessRequestStatus', 'Set-BetaAccessRequestConfig', 'Get-BetaAccountActivity', 'Get-BetaAccountActivities', 'Get-BetaAccountAggregationStatus', 'New-BetaAccount', - 'Remove-BetaAccount', 'Disable-BetaAccount', + 'Remove-BetaAccount', 'Remove-BetaAccountAsync', + 'Remove-BetaAccountsAsync', 'Disable-BetaAccount', 'Disable-BetaAccountForIdentity', 'Disable-BetaAccountsForIdentities', 'Enable-BetaAccount', 'Enable-BetaAccountForIdentity', 'Enable-BetaAccountsForIdentities', diff --git a/PSSailpoint/beta/README.md b/PSSailpoint/beta/README.md index 515918fb9..16a97259d 100644 --- a/PSSailpoint/beta/README.md +++ b/PSSailpoint/beta/README.md @@ -79,6 +79,8 @@ Class | Method | HTTP request | Description *BetaAccountUsagesApi* | [**Get-BetaUsagesByAccountId**](docs/BetaAccountUsagesApi.md#Get-BetaUsagesByAccountId) | **GET** /account-usages/{accountId}/summaries | Returns account usage insights *BetaAccountsApi* | [**New-BetaAccount**](docs/BetaAccountsApi.md#New-BetaAccount) | **POST** /accounts | Create Account *BetaAccountsApi* | [**Remove-BetaAccount**](docs/BetaAccountsApi.md#Remove-BetaAccount) | **DELETE** /accounts/{id} | Delete Account +*BetaAccountsApi* | [**Remove-BetaAccountAsync**](docs/BetaAccountsApi.md#Remove-BetaAccountAsync) | **POST** /accounts/{id}/remove | Remove Account +*BetaAccountsApi* | [**Remove-BetaAccountsAsync**](docs/BetaAccountsApi.md#Remove-BetaAccountsAsync) | **POST** /sources/{id}/remove-accounts | Remove All Accounts *BetaAccountsApi* | [**Disable-BetaAccount**](docs/BetaAccountsApi.md#Disable-BetaAccount) | **POST** /accounts/{id}/disable | Disable Account *BetaAccountsApi* | [**Disable-BetaAccountForIdentity**](docs/BetaAccountsApi.md#Disable-BetaAccountForIdentity) | **POST** /identities-accounts/{id}/disable | Disable IDN Account for Identity *BetaAccountsApi* | [**Disable-BetaAccountsForIdentities**](docs/BetaAccountsApi.md#Disable-BetaAccountsForIdentities) | **POST** /identities-accounts/disable | Disable IDN Accounts for Identities diff --git a/PSSailpoint/beta/docs/BetaAccountsApi.md b/PSSailpoint/beta/docs/BetaAccountsApi.md index e47c14135..621defed3 100644 --- a/PSSailpoint/beta/docs/BetaAccountsApi.md +++ b/PSSailpoint/beta/docs/BetaAccountsApi.md @@ -6,6 +6,8 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**New-BetaAccount**](BetaAccountsApi.md#New-BetaAccount) | **POST** /accounts | Create Account [**Remove-BetaAccount**](BetaAccountsApi.md#Remove-BetaAccount) | **DELETE** /accounts/{id} | Delete Account +[**Remove-BetaAccountAsync**](BetaAccountsApi.md#Remove-BetaAccountAsync) | **POST** /accounts/{id}/remove | Remove Account +[**Remove-BetaAccountsAsync**](BetaAccountsApi.md#Remove-BetaAccountsAsync) | **POST** /sources/{id}/remove-accounts | Remove All Accounts [**Disable-BetaAccount**](BetaAccountsApi.md#Disable-BetaAccount) | **POST** /accounts/{id}/disable | Disable Account [**Disable-BetaAccountForIdentity**](BetaAccountsApi.md#Disable-BetaAccountForIdentity) | **POST** /identities-accounts/{id}/disable | Disable IDN Account for Identity [**Disable-BetaAccountsForIdentities**](BetaAccountsApi.md#Disable-BetaAccountsForIdentities) | **POST** /identities-accounts/disable | Disable IDN Accounts for Identities @@ -123,6 +125,108 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **Remove-BetaAccountAsync** +> TaskResultDto Remove-BetaAccountAsync
+>         [-Id]
+ +Remove Account + +Use this endpoint to remove accounts from the system without provisioning changes to the source. Accounts that are removed could be re-created during the next aggregation. This endpoint is good for: * Removing accounts that no longer exist on the source. * Removing accounts that won't be aggregated following updates to the source configuration. * Forcing accounts to be re-created following the next aggregation to re-run account processing, support testing, etc. + +### Example +```powershell +# general setting of the PowerShell module, e.g. base URL, authentication, etc +$Configuration = Get-Configuration +# Configure OAuth2 access token for authorization: UserContextAuth +$Configuration.AccessToken = "YOUR_ACCESS_TOKEN" + +# Configure OAuth2 access token for authorization: UserContextAuth +$Configuration.AccessToken = "YOUR_ACCESS_TOKEN" + +$Id = "c350d6aa4f104c61b062cb632421ad10" # String | The account id + +# Remove Account +try { + $Result = Remove-BetaAccountAsync -Id $Id +} catch { + Write-Host ("Exception occurred when calling Remove-BetaAccountAsync: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Id** | **String**| The account id | + +### Return type + +[**TaskResultDto**](TaskResultDto.md) (PSCustomObject) + +### Authorization + +[UserContextAuth](../README.md#UserContextAuth), [UserContextAuth](../README.md#UserContextAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **Remove-BetaAccountsAsync** +> TaskResultDto Remove-BetaAccountsAsync
+>         [-Id]
+ +Remove All Accounts + +Use this endpoint to remove all accounts from the system without provisioning changes to the source. Accounts that are removed could be re-created during the next aggregation. This endpoint is good for: * Removing accounts that no longer exist on the source. * Removing accounts that won't be aggregated following updates to the source configuration. * Forcing accounts to be re-created following the next aggregation to re-run account processing, support testing, etc. + +### Example +```powershell +# general setting of the PowerShell module, e.g. base URL, authentication, etc +$Configuration = Get-Configuration +# Configure OAuth2 access token for authorization: UserContextAuth +$Configuration.AccessToken = "YOUR_ACCESS_TOKEN" + +# Configure OAuth2 access token for authorization: UserContextAuth +$Configuration.AccessToken = "YOUR_ACCESS_TOKEN" + +$Id = "ebbf35756e1140699ce52b233121384a" # String | The source id + +# Remove All Accounts +try { + $Result = Remove-BetaAccountsAsync -Id $Id +} catch { + Write-Host ("Exception occurred when calling Remove-BetaAccountsAsync: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **Id** | **String**| The source id | + +### Return type + +[**TaskResultDto**](TaskResultDto.md) (PSCustomObject) + +### Authorization + +[UserContextAuth](../README.md#UserContextAuth), [UserContextAuth](../README.md#UserContextAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **Disable-BetaAccount** > AccountsAsyncResult Disable-BetaAccount
diff --git a/PSSailpoint/beta/src/PSSailpointBeta/Api/BetaAccountsApi.ps1 b/PSSailpoint/beta/src/PSSailpointBeta/Api/BetaAccountsApi.ps1 index f5bf11570..959acc296 100644 --- a/PSSailpoint/beta/src/PSSailpointBeta/Api/BetaAccountsApi.ps1 +++ b/PSSailpoint/beta/src/PSSailpointBeta/Api/BetaAccountsApi.ps1 @@ -172,6 +172,154 @@ function Remove-BetaAccount { <# .SYNOPSIS +Remove Account + +.DESCRIPTION + +Use this endpoint to remove accounts from the system without provisioning changes to the source. Accounts that are removed could be re-created during the next aggregation. This endpoint is good for: * Removing accounts that no longer exist on the source. * Removing accounts that won't be aggregated following updates to the source configuration. * Forcing accounts to be re-created following the next aggregation to re-run account processing, support testing, etc. + +.PARAMETER Id +The account id + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +TaskResultDto +#> +function Remove-BetaAccountAsync { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String] + ${Id}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Remove-BetaAccountAsync' | 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 = '/accounts/{id}/remove' + if (!$Id) { + throw "Error! The required parameter `Id` missing when calling deleteAccountAsync." + } + $LocalVarUri = $LocalVarUri.replace('{id}', [System.Web.HTTPUtility]::UrlEncode($Id)) + + + + $LocalVarResult = Invoke-BetaApiClient -Method 'POST' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "TaskResultDto" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + +Remove All Accounts + +.DESCRIPTION + +Use this endpoint to remove all accounts from the system without provisioning changes to the source. Accounts that are removed could be re-created during the next aggregation. This endpoint is good for: * Removing accounts that no longer exist on the source. * Removing accounts that won't be aggregated following updates to the source configuration. * Forcing accounts to be re-created following the next aggregation to re-run account processing, support testing, etc. + +.PARAMETER Id +The 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 + +TaskResultDto +#> +function Remove-BetaAccountsAsync { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [String] + ${Id}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Remove-BetaAccountsAsync' | 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/{id}/remove-accounts' + if (!$Id) { + throw "Error! The required parameter `Id` missing when calling deleteAccountsAsync." + } + $LocalVarUri = $LocalVarUri.replace('{id}', [System.Web.HTTPUtility]::UrlEncode($Id)) + + + + $LocalVarResult = Invoke-BetaApiClient -Method 'POST' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "TaskResultDto" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + Disable Account .DESCRIPTION diff --git a/PSSailpoint/beta/tests/Api/BetaAccountsApi.Tests.ps1 b/PSSailpoint/beta/tests/Api/BetaAccountsApi.Tests.ps1 index 9d7dcc7a7..828d38ca5 100644 --- a/PSSailpoint/beta/tests/Api/BetaAccountsApi.Tests.ps1 +++ b/PSSailpoint/beta/tests/Api/BetaAccountsApi.Tests.ps1 @@ -22,6 +22,22 @@ Describe -tag 'PSSailpointBeta' -name 'BetaBetaAccountsApi' { } } + Context 'Remove-BetaAccountAsync' { + It 'Test Remove-BetaAccountAsync' { + #$TestResult = Remove-BetaAccountAsync -Id "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + + Context 'Remove-BetaAccountsAsync' { + It 'Test Remove-BetaAccountsAsync' { + #$TestResult = Remove-BetaAccountsAsync -Id "TEST_VALUE" + #$TestResult | Should -BeOfType TODO + #$TestResult.property | Should -Be 0 + } + } + Context 'Disable-BetaAccount' { It 'Test Disable-BetaAccount' { #$TestResult = Disable-BetaAccount -Id "TEST_VALUE" -AccountToggleRequest "TEST_VALUE"