Edit

New-AzImageBuilderTemplateSourceObject

Create an in-memory object for ImageTemplateSource.

Syntax

PlatformImageSource (Default)

New-AzImageBuilderTemplateSourceObject
    [-PlatformImageSource]
    [-Offer <String>]
    [-PlanInfoPlanName <String>]
    [-PlanInfoPlanProduct <String>]
    [-PlanInfoPlanPublisher <String>]
    [-Publisher <String>]
    [-Sku <String>]
    [-Version <String>]
    [<CommonParameters>]

ManagedImageSource

New-AzImageBuilderTemplateSourceObject
    -ImageId <String>
    [-ManagedImageSource]
    [<CommonParameters>]

SharedImageVersionSource

New-AzImageBuilderTemplateSourceObject
    -ImageVersionId <String>
    [-SharedImageVersionSource]
    [<CommonParameters>]

Description

Create an in-memory object for ImageTemplateSource.

Examples

Example 1: Create a managed image source.

New-AzImageBuilderTemplateSourceObject -ManagedImageSource -ImageId "/subscriptions/{subId}/resourceGroups/azps_test_group_imagebuilder/providers/Microsoft.Compute/images/azps-vm-image"
ImageId
-------
/subscriptions/{subId}/resourceGroups/azps_test_group_imagebuilder/providers/Microsoft.Compute/images/azps-vm-image

This command creates a managed image source.

Example 2: Create a shared image source.

New-AzImageBuilderTemplateSourceObject -ImageVersionId "/subscriptions/{subId}/resourceGroups/azps_test_group_imagebuilder/providers/Microsoft.Compute/galleries/azpsazurecomputergallery/images/azps-vm-image/versions/1.0.0"
ExactVersion ImageVersionId
------------ --------------
             /subscriptions/{subId}/resourceGroups/azps_test_group_imagebuilder/providers/Microsoft.Compute...

This command creates a shared image source.

Example 3: Create a platform image source.

New-AzImageBuilderTemplateSourceObject -Publisher 'Canonical' -Offer 'UbuntuServer' -Sku '18.04-LTS' -Version 'latest'
ExactVersion Offer        Publisher Sku       Version
------------ -----        --------- ---       -------
             UbuntuServer Canonical 18.04-LTS latest

This command creates a platform image source.

Parameters

-ImageId

ARM resource id of the managed image in customer subscription.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ManagedImageSource
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ImageVersionId

ARM resource id of the image version. When image version name is 'latest', the version is evaluated when the image build takes place.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SharedImageVersionSource
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ManagedImageSource

Describes an image source that is a managed image in customer subscription. This image must reside in the same subscription and region as the Image Builder template.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ManagedImageSource
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Offer

Image offer from the Azure Gallery Images.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PlatformImageSource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PlanInfoPlanName

Name of the purchase plan.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PlatformImageSource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PlanInfoPlanProduct

Product of the purchase plan.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PlatformImageSource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PlanInfoPlanPublisher

Publisher of the purchase plan.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PlatformImageSource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PlatformImageSource

Describes an image source from Azure Gallery Images.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PlatformImageSource
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Publisher

Image Publisher in Azure Gallery Images.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PlatformImageSource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SharedImageVersionSource

Describes an image source that is an image version in a shared image gallery.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SharedImageVersionSource
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Sku

Image sku from the Azure Gallery Images.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PlatformImageSource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Version

Image version from the Azure Gallery Images. If 'latest' is specified here, the version is evaluated when the image build takes place, not when the template is submitted.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PlatformImageSource
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

ImageTemplateManagedImageSource

ImageTemplatePlatformImageSource

ImageTemplateSharedImageVersionSource