Skip to main content

Import-AtriaWorkSpaceCustomerItem

SYNOPSIS

Imports one or more existing directory-backed WorkSpace items for a customer.

SYNTAX

Import-AtriaWorkSpaceCustomerItem -CustomerId <Int> -IDPType <String> -ItemTypeID <Int> -ItemDefinition <WorkSpaceImportItem> [<CommonParameters>]

Import-AtriaWorkSpaceCustomerItem -CustomerId <Int> -IDPType <String> -ItemTypeName <String> -ItemDefinition <WorkSpaceImportItem> [<CommonParameters>]

ItemDefinition accepts pipeline input.

DESCRIPTION

Imports existing resources through /v2/customers/{customerId}/services/workspace/items. Identify the default item type by ID or exact name. An individual definition can override that type with its own non-zero itemTypeId.

The WorkSpaceImportItem class is exported by Atria.Tools:

class WorkSpaceImportItem {
[string] $dirResName
[string] $displayName
[string] $description
[int] $itemTypeId
[string] $iconFileUrl
[string] $iconReference
[string] $sku
[bool] $isDefault
[int] $itemSortOrder
[string[]] $tagLabels
}

Use using module Atria.Tools at the start of a script that refers to the class in parsed code.

PARAMETERS

  • CustomerId <Int> (Required) Customer receiving the imported items.
  • IDPType <String> (Required) Identity-provider type used to resolve valid item types, such as ActiveDirectory or AzureAD.
  • ItemDefinition <WorkSpaceImportItem> (Required; pipeline input) One or more definitions of existing resources.
  • ItemTypeID <Int> (Required in the ByItemTypeID parameter set) Default item-type identifier.
  • ItemTypeName <String> (Required in the ByItemTypeName parameter set) Exact default item-type name.

EXAMPLE

using module Atria.Tools

$item = [WorkSpaceImportItem]@{
dirResName = 'Example-Accounts-App'
displayName = 'Accounts application'
description = 'Existing directory group for the accounts application'
isDefault = $false
itemSortOrder = 10
tagLabels = @('finance', 'application')
}

$item | Import-AtriaWorkSpaceCustomerItem `
-CustomerId 123 `
-IDPType 'ActiveDirectory' `
-ItemTypeName 'Application'

OUTPUTS

Returns the API response for each imported item.

NOTES

Call Connect-AtriaApi first. Import expects the referenced directory resource to exist; it is different from creating a new WorkSpace item.