@@ -176,6 +176,7 @@ class ImageTemplate(Resource):
176176 ~azure.mgmt.imagebuilder.models.ImageTemplateLastRunStatus
177177 :param build_timeout_in_minutes: Maximum duration to wait while building
178178 the image template. Omit or specify 0 to use the default (4 hours).
179+ Default value: 0 .
179180 :type build_timeout_in_minutes: int
180181 :param vm_profile: Describes how virtual machine is set up to build images
181182 :type vm_profile: ~azure.mgmt.imagebuilder.models.ImageTemplateVmProfile
@@ -215,7 +216,7 @@ class ImageTemplate(Resource):
215216 'identity' : {'key' : 'identity' , 'type' : 'ImageTemplateIdentity' },
216217 }
217218
218- def __init__ (self , * , location : str , source , distribute , identity , tags = None , customize = None , build_timeout_in_minutes : int = None , vm_profile = None , ** kwargs ) -> None :
219+ def __init__ (self , * , location : str , source , distribute , identity , tags = None , customize = None , build_timeout_in_minutes : int = 0 , vm_profile = None , ** kwargs ) -> None :
219220 super (ImageTemplate , self ).__init__ (location = location , tags = tags , ** kwargs )
220221 self .source = source
221222 self .customize = customize
@@ -320,7 +321,7 @@ class ImageTemplateFileCustomizer(ImageTemplateCustomizer):
320321 VM. It can be a github link, SAS URI for Azure Storage, etc
321322 :type source_uri: str
322323 :param sha256_checksum: SHA256 checksum of the file provided in the
323- sourceUri field above
324+ sourceUri field above. Default value: "" .
324325 :type sha256_checksum: str
325326 :param destination: The absolute path to a file (with nested directory
326327 structures already created) where the file (from sourceUri) will be
@@ -340,7 +341,7 @@ class ImageTemplateFileCustomizer(ImageTemplateCustomizer):
340341 'destination' : {'key' : 'destination' , 'type' : 'str' },
341342 }
342343
343- def __init__ (self , * , name : str = None , source_uri : str = None , sha256_checksum : str = None , destination : str = None , ** kwargs ) -> None :
344+ def __init__ (self , * , name : str = None , source_uri : str = None , sha256_checksum : str = "" , destination : str = None , ** kwargs ) -> None :
344345 super (ImageTemplateFileCustomizer , self ).__init__ (name = name , ** kwargs )
345346 self .source_uri = source_uri
346347 self .sha256_checksum = sha256_checksum
@@ -351,8 +352,9 @@ def __init__(self, *, name: str=None, source_uri: str=None, sha256_checksum: str
351352class ImageTemplateIdentity (Model ):
352353 """Identity for the image template.
353354
354- :param type: The type of identity used for the image template. Possible
355- values include: 'UserAssigned'
355+ :param type: The type of identity used for the image template. The type
356+ 'None' will remove any identities from the image template. Possible values
357+ include: 'UserAssigned', 'None'
356358 :type type: str or ~azure.mgmt.imagebuilder.models.ResourceIdentityType
357359 :param user_assigned_identities: The list of user identities associated
358360 with the image template. The user identity dictionary key references will
@@ -556,6 +558,9 @@ class ImageTemplatePlatformImageSource(ImageTemplateSource):
556558 :type sku: str
557559 :param version: Image version from the [Azure Gallery
558560 Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
561+ If 'latest' is specified here, the version is evaluated when the image
562+ build takes place, not when the template is submitted. Specifying 'latest'
563+ could cause ROUNDTRIP_INCONSISTENT_PROPERTY issue which will be fixed.
559564 :type version: str
560565 :param plan_info: Optional configuration of purchase plan for platform
561566 image.
@@ -601,13 +606,17 @@ class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer):
601606 It can be a github link, SAS URI for Azure Storage, etc
602607 :type script_uri: str
603608 :param sha256_checksum: SHA256 checksum of the power shell script provided
604- in the scriptUri field above
609+ in the scriptUri field above. Default value: "" .
605610 :type sha256_checksum: str
606611 :param inline: Array of PowerShell commands to execute
607612 :type inline: list[str]
608613 :param run_elevated: If specified, the PowerShell script will be run with
609- elevated privileges
614+ elevated privileges. Default value: False .
610615 :type run_elevated: bool
616+ :param run_as_system: If specified, the PowerShell script will be run with
617+ elevated privileges using the Local System user. Can only be true when the
618+ runElevated field above is set to true. Default value: False .
619+ :type run_as_system: bool
611620 :param valid_exit_codes: Valid exit codes for the PowerShell script.
612621 [Default: 0]
613622 :type valid_exit_codes: list[int]
@@ -624,15 +633,17 @@ class ImageTemplatePowerShellCustomizer(ImageTemplateCustomizer):
624633 'sha256_checksum' : {'key' : 'sha256Checksum' , 'type' : 'str' },
625634 'inline' : {'key' : 'inline' , 'type' : '[str]' },
626635 'run_elevated' : {'key' : 'runElevated' , 'type' : 'bool' },
636+ 'run_as_system' : {'key' : 'runAsSystem' , 'type' : 'bool' },
627637 'valid_exit_codes' : {'key' : 'validExitCodes' , 'type' : '[int]' },
628638 }
629639
630- def __init__ (self , * , name : str = None , script_uri : str = None , sha256_checksum : str = None , inline = None , run_elevated : bool = None , valid_exit_codes = None , ** kwargs ) -> None :
640+ def __init__ (self , * , name : str = None , script_uri : str = None , sha256_checksum : str = "" , inline = None , run_elevated : bool = False , run_as_system : bool = False , valid_exit_codes = None , ** kwargs ) -> None :
631641 super (ImageTemplatePowerShellCustomizer , self ).__init__ (name = name , ** kwargs )
632642 self .script_uri = script_uri
633643 self .sha256_checksum = sha256_checksum
634644 self .inline = inline
635645 self .run_elevated = run_elevated
646+ self .run_as_system = run_as_system
636647 self .valid_exit_codes = valid_exit_codes
637648 self .type = 'PowerShell'
638649
@@ -700,6 +711,7 @@ class ImageTemplateSharedImageDistributor(ImageTemplateDistributor):
700711 :type replication_regions: list[str]
701712 :param exclude_from_latest: Flag that indicates whether created image
702713 version should be excluded from latest. Omit to use the default (false).
714+ Default value: False .
703715 :type exclude_from_latest: bool
704716 :param storage_account_type: Storage account type to be used to store the
705717 shared image. Omit to use the default (Standard_LRS). Possible values
@@ -725,7 +737,7 @@ class ImageTemplateSharedImageDistributor(ImageTemplateDistributor):
725737 'storage_account_type' : {'key' : 'storageAccountType' , 'type' : 'str' },
726738 }
727739
728- def __init__ (self , * , run_output_name : str , gallery_image_id : str , replication_regions , artifact_tags = None , exclude_from_latest : bool = None , storage_account_type = None , ** kwargs ) -> None :
740+ def __init__ (self , * , run_output_name : str , gallery_image_id : str , replication_regions , artifact_tags = None , exclude_from_latest : bool = False , storage_account_type = None , ** kwargs ) -> None :
729741 super (ImageTemplateSharedImageDistributor , self ).__init__ (run_output_name = run_output_name , artifact_tags = artifact_tags , ** kwargs )
730742 self .gallery_image_id = gallery_image_id
731743 self .replication_regions = replication_regions
@@ -779,7 +791,7 @@ class ImageTemplateShellCustomizer(ImageTemplateCustomizer):
779791 can be a github link, SAS URI for Azure Storage, etc
780792 :type script_uri: str
781793 :param sha256_checksum: SHA256 checksum of the shell script provided in
782- the scriptUri field
794+ the scriptUri field. Default value: "" .
783795 :type sha256_checksum: str
784796 :param inline: Array of shell commands to execute
785797 :type inline: list[str]
@@ -797,7 +809,7 @@ class ImageTemplateShellCustomizer(ImageTemplateCustomizer):
797809 'inline' : {'key' : 'inline' , 'type' : '[str]' },
798810 }
799811
800- def __init__ (self , * , name : str = None , script_uri : str = None , sha256_checksum : str = None , inline = None , ** kwargs ) -> None :
812+ def __init__ (self , * , name : str = None , script_uri : str = None , sha256_checksum : str = "" , inline = None , ** kwargs ) -> None :
801813 super (ImageTemplateShellCustomizer , self ).__init__ (name = name , ** kwargs )
802814 self .script_uri = script_uri
803815 self .sha256_checksum = sha256_checksum
@@ -861,10 +873,10 @@ class ImageTemplateVmProfile(Model):
861873
862874 :param vm_size: Size of the virtual machine used to build, customize and
863875 capture images. Omit or specify empty string to use the default
864- (Standard_D1_v2).
876+ (Standard_D1_v2). Default value: "" .
865877 :type vm_size: str
866878 :param os_disk_size_gb: Size of the OS disk in GB. Omit or specify 0 to
867- use Azure's default OS disk size.
879+ use Azure's default OS disk size. Default value: 0 .
868880 :type os_disk_size_gb: int
869881 :param vnet_config: Optional configuration of the virtual network to use
870882 to deploy the build virtual machine in. Omit if no specific virtual
@@ -882,7 +894,7 @@ class ImageTemplateVmProfile(Model):
882894 'vnet_config' : {'key' : 'vnetConfig' , 'type' : 'VirtualNetworkConfig' },
883895 }
884896
885- def __init__ (self , * , vm_size : str = None , os_disk_size_gb : int = None , vnet_config = None , ** kwargs ) -> None :
897+ def __init__ (self , * , vm_size : str = "" , os_disk_size_gb : int = 0 , vnet_config = None , ** kwargs ) -> None :
886898 super (ImageTemplateVmProfile , self ).__init__ (** kwargs )
887899 self .vm_size = vm_size
888900 self .os_disk_size_gb = os_disk_size_gb
0 commit comments