Edit

New-AzImageBuilderTemplateDistributorObject

Create an in-memory object for ImageTemplateDistributor.

Syntax

VhdDistributor (Default)

New-AzImageBuilderTemplateDistributorObject
    -RunOutputName <String>
    [-ArtifactTag <IImageTemplateDistributorArtifactTags>]
    [-VhdDistributor]
    [-Uri <String>]
    [<CommonParameters>]

ManagedImageDistributor

New-AzImageBuilderTemplateDistributorObject
    -RunOutputName <String>
    -ImageId <String>
    -Location <String>
    [-ManagedImageDistributor]
    [-ArtifactTag <IImageTemplateDistributorArtifactTags>]
    [<CommonParameters>]

SharedImageDistributor

New-AzImageBuilderTemplateDistributorObject
    -RunOutputName <String>
    -GalleryImageId <String>
    [-ArtifactTag <IImageTemplateDistributorArtifactTags>]
    [-SharedImageDistributor]
    [-ExcludeFromLatest <Boolean>]
    [-ReplicationRegion <String[]>]
    [-StorageAccountType <String>]
    [-TargetRegion <ITargetRegion[]>]
    [-Versioning <IDistributeVersioner>]
    [<CommonParameters>]

Description

Create an in-memory object for ImageTemplateDistributor.

Examples

Example 1: Create a managed image distributor.

New-AzImageBuilderTemplateDistributorObject -ManagedImageDistributor -ArtifactTag @{tag='azpstest'} -ImageId "/subscriptions/{subId}/resourceGroups/azps_test_group_imagebuilder/providers/Microsoft.Compute/images/azps-vm-image" -RunOutputName "runoutput-01" -Location eastus
RunOutputName ImageId                                                                                                             Location
------------- -------                                                                                                             --------
runoutput-01  /subscriptions/{subId}/resourceGroups/azps_test_group_imagebuilder/providers/Microsoft.Compute/images/azps-vm-image eastus

This command creates a managed image distributor.

Example 2: Create a VHD distributor.

New-AzImageBuilderTemplateDistributorObject -ArtifactTag @{tag='vhd'} -VhdDistributor -RunOutputName image-vhd
RunOutputName Uri
------------- ---
image-vhd

This command creates a VHD distributor.

Example 3: Create a shared image distributor.

New-AzImageBuilderTemplateDistributorObject -SharedImageDistributor -ArtifactTag @{"test"="dis-share"} -GalleryImageId "/subscriptions/{subId}/resourceGroups/azps_test_group_imagebuilder/providers/Microsoft.Compute/galleries/azpsazurecomputergallery/images/azps-vm-image" -ReplicationRegion "eastus" -RunOutputName "runoutput-01"
RunOutputName ExcludeFromLatest GalleryImageId                                                        ReplicationRegion StorageAccountType
------------- ----------------- --------------                                                        ----------------- -------
runoutput-01                    /subscriptions/{subId}/resourceGroups/azps_test_group_imagebuilder... {eastus}

This command creates a shared image distributor.

Parameters

-ArtifactTag

Tags that will be applied to the artifact once it has been created/updated by the distributor.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExcludeFromLatest

Flag that indicates whether created image version should be excluded from latest. Omit to use the default (false).

Parameter properties

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

Parameter sets

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

-GalleryImageId

Resource Id of the Azure Compute Gallery image.

Parameter properties

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

Parameter sets

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

-ImageId

Resource Id of the Managed Disk Image.

Parameter properties

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

Parameter sets

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

-Location

Azure location for the image, should match if image already exists.

Parameter properties

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

Parameter sets

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

-ManagedImageDistributor

Distribute as a Managed Disk Image.

Parameter properties

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

Parameter sets

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

-ReplicationRegion

[Deprecated] A list of regions that the image will be replicated to. This list can be specified only if targetRegions is not specified. This field is deprecated - use targetRegions instead.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-RunOutputName

The name to be used for the associated RunOutput.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SharedImageDistributor

Distribute via Shared Image Gallery.

Parameter properties

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

Parameter sets

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

-StorageAccountType

[Deprecated] Storage account type to be used to store the shared image. Omit to use the default (Standard_LRS). This field can be specified only if replicationRegions is specified. This field is deprecated - use targetRegions instead.

Parameter properties

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

Parameter sets

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

-TargetRegion

The target regions where the distributed Image Version is going to be replicated to. This object supersedes replicationRegions and can be specified only if replicationRegions is not specified.

Parameter properties

Type:

ITargetRegion[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-Uri

Optional Azure Storage URI for the distributed VHD blob. Omit to use the default (empty string) in which case VHD would be published to the storage account in the staging resource group.

Parameter properties

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

Parameter sets

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

-Versioning

Describes how to generate new x.y.z version number for distribution.

Parameter properties

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

Parameter sets

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

-VhdDistributor

Distribute via VHD in a storage account.

Parameter properties

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

Parameter sets

VhdDistributor
Position:Named
Mandatory:True
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

ImageTemplateManagedImageDistributor

ImageTemplateSharedImageDistributor

ImageTemplateVhdDistributor