Snapshots
  • 16 Mar 2024
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Snapshots

  • Dark
    Light
  • PDF

Article summary

Get-LiquitPackageSnapshot

Synopsis

This command displays a list of all the snapshots belonging to a Liquit package.

Syntax

 Get-LiquitPackageSnapshot 
	[-Package] <Package> 
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]

 Get-LiquitPackageSnapshot 
	[-Package] <Package> 
	[-Type] {Archived | Cancelled | Development | Test | Acceptance | Production}
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]

 Get-LiquitPackageSnapshot 
	[-Package] <Package> 
	[-ID] <guid[]> 
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]

 Get-LiquitPackageSnapshot 
	[-Package] <Package> 
	[-EntityRef] <EntityRef[]> 
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]

Examples

Example 1: Get-LiquitPackageSnapshot

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 Get-LiquitPackageSnapshot -Package $package

This command lists all available snapshots of a package.

Example 2: Get-LiquitPackageSnapshot

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 Get-LiquitPackageSnapshot -package $package -type 'Development'

This command selects only the development snapshot of the package.

Example 3: Get- LiquitPackageSnapshot

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 Get-LiquitPackageSnapshot -package $package -id 00000000-0000-0000-0000-000000000000

This command selects the snapshot with the id 00000000-0000-0000-0000-000000000000.

New-LiquitPackageSnapshot

Synopsis

This command creates a new snapshot.

Syntax

 New-LiquitPackageSnapshot 
	[-Package] <Package> 
	[-Name <string>] 
	[-Description <string>] 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf]
	[-Confirm]  
	[<CommonParameters>]

Example

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 New-LiquitPackageSnapshot -Package $package

This command creates a new snapshot. Newly created snapshots are always of the development type.

Parameters

NameValueDescriptionRequiredDefault value
Package<Package>The package for which you want to create a new snapshot.Yes
Name<string>Provide a name for the snapshot.No
Description<string>Provide a description for the snapshot.No
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Set- LiquitPackageSnapshot

Synopsis

This command lets you edit the properties of a snapshot.

Syntax

 Set-LiquitPackageSnapshot 
	[-Snapshot] <PackageSnapshot[]> 
	[-Name <string>] 
	[-Description <string>] 
	[-LiquitContext <LiquitContext>]
	[-WhatIf] 
	[-Confirm]  
	[<CommonParameters>] 

Example

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 Get-LiquitPackageSnapshot -package $package -id 00000000-0000-0000-0000-000000000000
 Set-LiquitPackageSnapshot -Snapshot $snapshot -name 'Updated PowerShell Package Snapshot '

This command renames an existing snapshot as "Updated PowerShell Package Snapshot".

Parameters

NameValueDescriptionRequiredDefault value
Snapshot<PackageSnapshot>The snapshot to be updated.Yes
Name<string>Provide a name for the snapshot.No
Description<string>Provide a description for the snapshot.No
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Publish-LiquitPackageSnapshot

Synopsis

Publishes the snapshot in a defined stage, this can be either development, test, acceptance or production.

Syntax

 Publish-LiquitPackageSnapshot 
	[-Snapshot] <PackageSnapshot[]> 
	[[-Stage] {Development | Test | Acceptance | Production}] 
	[-Name <string>] 
	[-Description <string>] 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf] 
	[-Confirm]  
	[<CommonParameters>] 

Example

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 $snapshot = Get-LiquitPackageSnapshot -package $package -id 00000000-0000-0000-0000-000000000000
 Publish-LiquitPackageSnapshot -Snapshot $snapshot -stage Test

This command moves the snapshot to the “Test” Stage. If a snapshot was already present in the Test stage, it will be archived as “Cancelled”.

Parameters

NameValueDescriptionRequiredDefault value
Snapshot<PackageSnapshot>The snapshot to be updated.Yes
Stage{Development | Test | Acceptance | Production}The stage to which the snapshot needs to be published. The following options are available:
  • Development
  • Test
  • Acceptance
  • Production
Name<string>Provide a name for the snapshot.No
Description<string>Provide a description for the snapshot.No
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Remove-LiquitPackageSnapshot

Synopsis

This command removes a snapshot from the Liquit Workspace.

Syntax

 Remove-LiquitPackageSnapshot
	[-Snapshot] <PackageSnapshot[]> 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf] 
	[-Confirm]
	[<CommonParameters>] 

Example

 $package = Get-LiquitPackage -id 00000000-0000-0000-0000-000000000000
 $snapshot = Get-LiquitPackageSnapshot -package $package -id 00000000-0000-0000-0000-000000000000
 Remove-LiquitPackage -Snapshot $snapshot

This command removes the selected snapshot from the Liquit Workspace.

Parameters

NameValueDescriptionRequiredDefault value
Snapshot<Snapshot[]>The snapshot you wish to remove.Yes
LiquitContext<LiquitContext>Determines the selected zone.NoDefault

Was this article helpful?

What's Next