SQL Clone 2

Get-SqlCloneTemplate

Get-SqlCloneTemplate

Gets clone templates of an image from a SQL Clone Server.

Syntax

Get-SqlCloneTemplate [-Image] <ImageResource> [[-Name] <string>] [<CommonParameters>]

Description

The Get-SqlCloneTemplate cmdlet gets details of clone templates of given image

Without passing Name parameter, this cmdlet gets details of all clone templates of given image.

By passing Name parameter, this cmdlet gets details of all clone templates of given image.

This cmdlet returns CloneTemplateResource which can be passed to the New-SqlClone cmdlet.

Connect-SqlClone must be called before this cmdlet.

Parameters

-Image <RedGate.SqlClone.Client.Api.Objects.ImageResource>

Specifies the parent image that has clone template. The Get-SqlCloneImage cmdlet can be used to get an ImageResource.

Aliases None
Required? true
Position? 0
Default Value None
Accept Pipeline Input true (ByValue)
Accept Wildcard Characters false

-Name <System.String>

Specifies the name of the clone template. Wildcards are permitted.

Aliases None
Required? false
Position? 1
Default Value None
Accept Pipeline Input false
Accept Wildcard Characters false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • RedGate.SqlClone.Client.Api.Objects.ImageResource

    Specifies the parent image that has clone template. The Get-SqlCloneImage cmdlet can be used to get an ImageResource.

Return values

The output type is the type of the objects that the cmdlet emits.

  • RedGate.SqlClone.Client.Api.Objects.CloneTemplateResource

Examples

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

Connect-SqlClone -ServerUrl 'http://sql-clone.example.com:14145'
$Image = Get-SqlCloneImage -Name 'AdventureWorks-20170106110745'
Get-SqlCloneTemplate -Image $Image

This example gets details of all clone template of the image named 'AdventureWorks-20170106110745' from a SQL Clone Server.

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

Connect-SqlClone -ServerUrl 'http://sql-clone.example.com:14145'
$Image = Get-SqlCloneImage -Name 'AdventureWorks-20170106110745'
Get-SqlCloneTemplate -Image $Image -Name 'MyCloneTemplate'

This example gets details of clone template named 'MyCloneTemplate' of the image named 'AdventureWorks-20170106110745' from a SQL Clone Server.

---------- EXAMPLE 3 ----------

Connect-SqlClone -ServerUrl 'http://sql-clone.example.com:14145'
$Image = Get-SqlCloneImage -Name 'AdventureWorks-20170106110745'
Get-SqlCloneTemplate -Image $Image -Name 'dev-*'

This example gets details of all clone templates with the prefix 'dev-' of the image named 'AdventureWorks-20170106110745' from a SQL Clone Server.


Didn't find what you were looking for?