SDK templates

This commit is contained in:
luke-hagar-sp
2023-06-26 12:06:47 -05:00
parent 292c721164
commit ad8b3ba84f
19 changed files with 938 additions and 8 deletions

View File

@@ -0,0 +1,28 @@
$JSON = @"
{
"indices": [
"identities"
],
"query": {
"query": "*",
"fields": [
"name"
]
},
"sort": [
"-displayName"
]
}
"@
$Search = ConvertFrom-JsonToSearch -Json $JSON
try {
Invoke-PaginateSearch -Increment 50 -Limit 10000 -Search $Search
} catch {
Write-Host ("Exception occurred when calling Invoke-PaginateSearch: {0}" -f $_.ErrorDetails)
Write-Host ("Response headers: {0}" -f $_.Exception.Response.Headers)
}

View File

@@ -0,0 +1,14 @@
$Parameters = @{
"Filters" = 'name co "Andrew"'
}
# Accounts List
try {
Invoke-Paginate -Function "Get-Accounts" -Increment 250 -Limit 1000 -InitialOffset 0 -Parameters $Parameters
} catch {
Write-Host ("Exception occurred when calling Invoke-Paginate: {0}" -f $_.ErrorDetails)
Write-Host ("Response headers: {0}" -f $_.Exception.Response.Headers)
}

View File

@@ -0,0 +1,14 @@
$ENT = @(
@{
op = "replace"
path = "/privileged"
value = $false
}
)
try {
Update-BetaEntitlement -Id "2c9180848366cdc701837b78f5ce58be" -JsonPatchOperation $ENT
} catch {
Write-Host ("Exception occurred when calling Update-BetaEntitlement: {0}" -f $_.ErrorDetails)
Write-Host ("Response headers: {0}" -f $_.Exception.Response.Headers)
}

View File

@@ -0,0 +1,14 @@
$Limit = 250 # Int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
$Offset = 0 # Int32 | 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. (optional) (default to 0)
$Count = $true # Boolean | 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. (optional) (default to $false)
$Filters = 'sourceId eq "f4e73766efdf4dc6acdeed179606d694"' # String | 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: **id**: *eq, in* **identityId**: *eq* **name**: *eq, in* **nativeIdentity**: *eq, in* **sourceId**: *eq, in* **uncorrelated**: *eq* (optional)
# Accounts List
try {
Get-Accounts -Limit $Limit -Offset $Offset -Count $Count -Filters $Filters
} catch {
Write-Host ("Exception occurred when calling Get-Accounts: {0}" -f $_.ErrorDetails)
Write-Host ("Response headers: {0}" -f $_.Exception.Response.Headers)
}

View File

@@ -0,0 +1,22 @@
$Json = @"
{
"indices": [
"identities"
],
"query": {
"query": "*",
"fields": [
"name"
]
}
}
"@
$Search = ConvertFrom-JsonToSearch -Json $Json
try {
Search-Post -Search $Search
} catch {
Write-Host ("Exception occurred when calling Search-Post: {0}" -f $_.ErrorDetails)
Write-Host ("Response headers: {0}" -f $_.Exception.Response.Headers)
}

View File

@@ -0,0 +1,24 @@
# Create transform
$JSON = @"
{
"name": "New Transform",
"type": "lookup",
"attributes" : {
"table" : {
"USA": "Americas",
"FRA": "EMEA",
"AUS": "APAC",
"default": "Unknown Region"
}
}
}
"@
$Transform = ConvertFrom-JsonToTransform -Json $JSON
try {
New-Transform -Transform $Transform
} catch {
Write-Host ("Exception occurred when calling New-Transform: {0}" -f $_.ErrorDetails)
Write-Host ("Response headers: {0}" -f $_.Exception.Response.Headers)
}