Import-AtriaWorkspaceItem
SYNOPSIS
Imports workspace items into Atria for a specified customer and Identity Provider (IDP) type.
SYNTAX
Import-AtriaWorkspaceItem -CustomerId <Int> -IDPType <String> [-ItemTypeID <Int>] -ItemDefinition <WorkSpaceImportItem> [<CommonParameters>]
Import-AtriaWorkspaceItem -CustomerId <Int> -IDPType <String> [-ItemTypeName <String>] -ItemDefinition <WorkSpaceImportItem> [<CommonParameters>]
DESCRIPTION
Imports workspace items into Atria using the Atria API. Items to be imported should be defined using the WorkSpaceImportItem
class, which is available by issuing the following command:
Using Module Atria.Tools
You can import items by specifying either an item type ID (ItemTypeID
) or an item type name (ItemTypeName
). This function supports pipeline input for workspace item definitions.
Definition of WorkSpaceImportItem
The WorkSpaceImportItem
class is defined as follows:
Class WorkSpaceImportItem {
[String]$dirResName
[String]$Name
[String]$Description
[Int]$itemTypeId
[String]$iconFileUrl
[String]$iconReference
[String]$sku
[Bool]$isDefault
[int]$itemSortOrder
[String[]]$tagLabels
}
PARAMETERS
-
CustomerId
<Int>
(Required)
The ID of the customer for whom workspace items will be imported. -
IDPType
<String>
(Required)
The Identity Provider (IDP) type associated with the workspace items. -
ItemDefinition
<WorkSpaceImportItem>
(Required, pipeline input)
Workspace item definition(s) to import. -
ItemTypeID
<Int>
(Optional)
Specifies the ID of the workspace item type (required when usingByItemTypeID
parameter set). -
ItemTypeName
<String>
(Optional)
Specifies the name of the workspace item type (required when usingByItemTypeName
parameter set). -
<CommonParameters>
Supports common parameters:Verbose
,Debug
,ErrorAction
,ErrorVariable
,WarningAction
,WarningVariable
,OutBuffer
,PipelineVariable
, andOutVariable
. More information: about_CommonParameters.
OUTPUTS
Returns API response object(s) confirming imported workspace items.
EXAMPLES
Example 1
Using Module Atria.Tools
$item = [WorkSpaceImportItem]@{
dirResName = "Group123"
Name = "Standard Group"
Description = "A standard workspace group"
itemTypeId = 456
isDefault = $false
itemSortOrder = 10
tagLabels = @("tag1", "tag2")
}
Import-AtriaWorkspaceItem -CustomerId 123 -IDPType "ActiveDirectory" -ItemTypeID 456 -ItemDefinition $item
Imports a workspace item defined by the WorkSpaceImportItem
class for customer ID 123
using Item Type ID 456
and IDP Type ActiveDirectory
.
Example 2 (Pipeline Input)
Using Module Atria.Tools
$item = [WorkSpaceImportItem]@{
Name = "Special Group"
Description = "A special workspace group"
itemTypeId = 789
iconReference = "special-icon-ref"
sku = "SKU789"
isDefault = $true
}
$item | Import-AtriaWorkspaceItem -CustomerId 123 -IDPType "AzureAD" -ItemTypeName "Special Item"
Imports a workspace item via pipeline input for customer ID 123
, using the item type named Special Item
and IDP Type AzureAD
.
NOTES
Ensure you've authenticated using Connect-AtriaApi
before invoking this function.