Name

Import-JS7InventoryItem

SYNOPSIS

Import inventory objects, e.g. workflows, schedules etc. from a JOC Cockpit archive file

SYNTAX

Import-JS7InventoryItem [-FilePath] <String> [[-Format] <String>] [[-TargetFolder] <String>] [[-Prefix] <String>] [[-Suffix] <String>] [-Overwrite] [-Deploy] [[-ControllerId] <String>] [[-SignatureAlgorithm] <String>] [[-AuditComment] <String>] [[-AuditTimeSpent] <Int32>] [[-AuditTicketLink] <Uri>] [<CommonParameters>]

DESCRIPTION

JOC Cockpit inventory items can be exported with the Export-JS7InventoryItem cmdlet. The archive file
created by the cmdlet can be imported by use of this cmdlet. This offers a mechanism to backup and to
restore inventory data, e.g. in case of switching the DBMS for JOC Cockpit or when upgrading to newer
JS7 releases.

Consider that this cmdlet requires PowerShell version 6.0 or newer.

The following REST Web Service API resources are used:

* /inventory/import
* /inventory/deployment/import_deploy

PARAMETERS

FilePath

-FilePath <String>
Specifies the path to the archive file that includes objects for import to the JOC Cockpit inventory.

Required?true
Position?1
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Format

-Format <String>
Specifies the type of the archive file that will be imported: ZIP, TAR.GZ.

Required?false
Position?2
Default valueZIP
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

TargetFolder

-TargetFolder <String>
Optionally specifies the folder in the JOC Cockpit inventory to which imported objects paths should be added.

Without this parameter any folders as specified with the import file will be used.
New folders are automatically created and optionally existing folders will be overwritten.

Required?false
Position?3
Default value/
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Prefix

-Prefix <String>
Specifies a prefix - followed by a dash - to be prepended to object names in case that a target object
with the same name exists and that the -Overwrite switch has not been used.

If an object with the same name including the prefix exists then a unique name is created from an
incremental number that is inserted between the prefix and the dash.

Required?false
Position?4
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Suffix

-Suffix <String>
Specifies a suffix - preceded by a dash - to be appended to object names in case that a target object
with the same name exists and that the -Overwrite switch has not been used.

If an object with the same name including the suffix exists then a unique name is created from an
incremental number that is inserted between the suffix and the dash.

If both -Prefix and -Suffix parameters are specified then the -Prefix parameter is ignored.

Required?false
Position?5
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Overwrite

-Overwrite <SwitchParameter>
Specifies that existing objects in the JOC Cockpit inventory will be overwritten
from objects with the same path in the archive file.

Without this parameter objects from the import file are ignored if objects with the same path
exist in the JOC Cockpit inventory.

Required?false
Position?named
Default valueFalse
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

Deploy

-Deploy <SwitchParameter>
When deploying scheduling objects for high security level then they must be exported for signing and must be digitally signed,
for example using the Export-JS7InventoryFolder and Sign-JS7Workflow cmdlets. Deployment is performed on import of the signed worfklows.

The switch specifieds that both operations to import and to deploy should be performed for high security level.

The switch requires to specify the -ControllerId and -SignatureAlgorithm arguments.

Required?false
Position?named
Default valueFalse
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

ControllerId

-ControllerId <String>
When deploying scheduling objects for high security level then they must be exported for signing and must be digitally signed,
for example using the Export-JS7InventoryFolder and Sign-JS7Workflow cmdlets. Deployment is performed on import of the signed worfklows.

The argument specifies the identification of the Controller to which scheduling objects should be deployed.

The argument requires to specify the -Deploy and -SignatureAlgorithm arguments.

Required?false
Position?6
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

SignatureAlgorithm

-SignatureAlgorithm <String>
When deploying scheduling objects for high security level then they must be exported for signing and must be digitally signed,
for example using the Export-JS7InventoryFolder and Sign-JS7Workflow cmdlets. Deployment is performed on import of the signed worfklows.

The argument specifies the algorithm used when creating signatures:

* SHA256withECDSA
* SHA512withECDSA
* SHA256withRSA
* SHA512withRSA

The argument requires to specify the -Deploy and -ControllerId arguments.

Required?false
Position?7
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

AuditComment

-AuditComment <String>
Specifies a free text that indicates the reason for the current intervention, e.g. "business requirement", "maintenance window" etc.

The Audit Comment is visible from the Audit Log view of the JOC Cockpit.
This parameter is not mandatory. However, the JOC Cockpit can be configured to require Audit Log comments for all interventions.

Required?false
Position?8
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

AuditTimeSpent

-AuditTimeSpent <Int32>
Specifies the duration in minutes that the current intervention required.

This information is shown in the Audit Log view. It can be useful when integrated
with a ticket system that logs the time spent on interventions with JS7.

Required?false
Position?9
Default value0
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

-AuditTicketLink <Uri>
Specifies a URL to a ticket system that keeps track of any interventions performed for JS7.

This information is shown in the Audit Log view of JOC Cockpit.
It can be useful when integrated with a ticket system that logs interventions with JS7.

Required?false
Position?10
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

about_JS7

EXAMPLES

-------------------------- EXAMPLE 1 --------------------------

PS > Import-JS7InventoryItem -FilePath /tmp/export.zip

Imports any objects included with the import file "export.zip". Objects existing with the same path in the JOC Cockpit inventory will not be overwritten.

-------------------------- EXAMPLE 2 --------------------------

PS > Import-JS7InventoryItem -TargetFolder /import -FilePath /tmp/export.tar.gz -Format TAR.GZ -Overwrite

Imports any objects from the given import file. As a compressed tar file is used the respective archive format is specified. Objects are added to the path /some_folder such as e.g. an object /myPath/myWorkflow will be added to the path /some_folder/myPath/myWorkflow. Any objects existing with the same path in the JOC Cockpit inventory will be overwritten.

  • No labels