azure.mgmt.imagebuilder.models module¶
-
exception
azure.mgmt.imagebuilder.models.
ApiErrorException
(deserialize, response, *args)[source]¶ Bases:
msrest.exceptions.HttpOperationError
Server responsed with exception of type: ‘ApiError’.
- Parameters
deserialize – A deserializer
response – Server response to be deserialized.
-
class
azure.mgmt.imagebuilder.models.
ApiError
(*, details=None, inner_error=None, code: str = None, target: str = None, message: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Api error.
- Parameters
details (list[ApiErrorBase]) – The Api error details
inner_error (InnerError) – The Api inner error
code (str) – The error code.
target (str) – The target of the particular error.
message (str) – The error message.
-
class
azure.mgmt.imagebuilder.models.
ApiErrorBase
(*, code: str = None, target: str = None, message: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Api error base.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplate
(*, location: str, source, distribute, identity, tags=None, customize=None, build_timeout_in_minutes: int = None, vm_profile=None, **kwargs)[source]¶ Bases:
azure.mgmt.imagebuilder.models._models_py3.Resource
Image template is an ARM resource managed by Microsoft.VirtualMachineImages provider.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- Variables
name (str) – Resource name
provisioning_state (str or ProvisioningState) – Provisioning state of the resource. Possible values include: ‘Creating’, ‘Updating’, ‘Succeeded’, ‘Failed’, ‘Deleting’
provisioning_error (ProvisioningError) – Provisioning error, if any
last_run_status (ImageTemplateLastRunStatus) – State of ‘run’ that is currently executing or was last executed.
- Parameters
location (str) – Required. Resource location
source (ImageTemplateSource) – Required. Specifies the properties used to describe the source image.
customize (list[ImageTemplateCustomizer]) – Specifies the properties used to describe the customization steps of the image, like Image source etc
distribute (list[ImageTemplateDistributor]) – Required. The distribution targets where the image output needs to go to.
build_timeout_in_minutes (int) – Maximum duration to wait while building the image template. Omit or specify 0 to use the default (4 hours).
vm_profile (ImageTemplateVmProfile) – Describes how virtual machine is set up to build images
identity (ImageTemplateIdentity) – Required. The identity of the image template, if configured.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateCustomizer
(*, name: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Describes a unit of image customization.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: ImageTemplateShellCustomizer, ImageTemplateRestartCustomizer, ImageTemplateWindowsUpdateCustomizer, ImageTemplatePowerShellCustomizer, ImageTemplateFileCustomizer
All required parameters must be populated in order to send to Azure.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateDistributor
(*, run_output_name: str, artifact_tags=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Generic distribution object.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: ImageTemplateManagedImageDistributor, ImageTemplateSharedImageDistributor, ImageTemplateVhdDistributor
All required parameters must be populated in order to send to Azure.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateFileCustomizer
(*, name: str = None, source_uri: str = None, sha256_checksum: str = None, destination: str = None, **kwargs)[source]¶ Bases:
azure.mgmt.imagebuilder.models._models_py3.ImageTemplateCustomizer
Uploads files to VMs (Linux, Windows). Corresponds to Packer file provisioner.
All required parameters must be populated in order to send to Azure.
- Parameters
name (str) – Friendly Name to provide context on what this customization step does
type (str) – Required. Constant filled by server.
source_uri (str) – The URI of the file to be uploaded for customizing the VM. It can be a github link, SAS URI for Azure Storage, etc
sha256_checksum (str) – SHA256 checksum of the file provided in the sourceUri field above
destination (str) – The absolute path to a file (with nested directory structures already created) where the file (from sourceUri) will be uploaded to in the VM
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateIdentity
(*, type=None, user_assigned_identities=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Identity for the image template.
- Parameters
type (str or ResourceIdentityType) – The type of identity used for the image template. Possible values include: ‘UserAssigned’
user_assigned_identities (dict[str, ImageTemplateIdentityUserAssignedIdentitiesValue]) – The list of user identities associated with the image template. The user identity dictionary key references will be ARM resource ids in the form: ‘/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}’.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateIdentityUserAssignedIdentitiesValue
(**kwargs)[source]¶ Bases:
msrest.serialization.Model
ImageTemplateIdentityUserAssignedIdentitiesValue.
Variables are only populated by the server, and will be ignored when sending a request.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateLastRunStatus
(*, start_time=None, end_time=None, run_state=None, run_sub_state=None, message: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Describes the latest status of running an image template.
- Parameters
start_time (datetime) – Start time of the last run (UTC)
end_time (datetime) – End time of the last run (UTC)
run_state (str or RunState) – State of the last run. Possible values include: ‘Running’, ‘Canceling’, ‘Succeeded’, ‘PartiallySucceeded’, ‘Failed’, ‘Canceled’
run_sub_state (str or RunSubState) – Sub-state of the last run. Possible values include: ‘Queued’, ‘Building’, ‘Customizing’, ‘Distributing’
message (str) – Verbose information about the last run state
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateManagedImageDistributor
(*, run_output_name: str, image_id: str, location: str, artifact_tags=None, **kwargs)[source]¶ Bases:
azure.mgmt.imagebuilder.models._models_py3.ImageTemplateDistributor
Distribute as a Managed Disk Image.
All required parameters must be populated in order to send to Azure.
- Parameters
run_output_name (str) – Required. The name to be used for the associated RunOutput.
artifact_tags (dict[str, str]) – Tags that will be applied to the artifact once it has been created/updated by the distributor.
type (str) – Required. Constant filled by server.
image_id (str) – Required. Resource Id of the Managed Disk Image
location (str) – Required. Azure location for the image, should match if image already exists
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateManagedImageSource
(*, image_id: str, **kwargs)[source]¶ Bases:
azure.mgmt.imagebuilder.models._models_py3.ImageTemplateSource
Describes an image source that is a managed image in customer subscription.
All required parameters must be populated in order to send to Azure.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplatePlatformImageSource
(*, publisher: str = None, offer: str = None, sku: str = None, version: str = None, plan_info=None, **kwargs)[source]¶ Bases:
azure.mgmt.imagebuilder.models._models_py3.ImageTemplateSource
Describes an image source from [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
All required parameters must be populated in order to send to Azure.
- Parameters
type (str) – Required. Constant filled by server.
publisher (str) – Image Publisher in [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
offer (str) – Image offer from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
sku (str) – Image sku from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
version (str) – Image version from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).
plan_info (PlatformImagePurchasePlan) – Optional configuration of purchase plan for platform image.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplatePowerShellCustomizer
(*, name: str = None, script_uri: str = None, sha256_checksum: str = None, inline=None, run_elevated: bool = None, valid_exit_codes=None, **kwargs)[source]¶ Bases:
azure.mgmt.imagebuilder.models._models_py3.ImageTemplateCustomizer
Runs the specified PowerShell on the VM (Windows). Corresponds to Packer powershell provisioner. Exactly one of ‘scriptUri’ or ‘inline’ can be specified.
All required parameters must be populated in order to send to Azure.
- Parameters
name (str) – Friendly Name to provide context on what this customization step does
type (str) – Required. Constant filled by server.
script_uri (str) – URI of the PowerShell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc
sha256_checksum (str) – SHA256 checksum of the power shell script provided in the scriptUri field above
inline (list[str]) – Array of PowerShell commands to execute
run_elevated (bool) – If specified, the PowerShell script will be run with elevated privileges
valid_exit_codes (list[int]) – Valid exit codes for the PowerShell script. [Default: 0]
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateRestartCustomizer
(*, name: str = None, restart_command: str = None, restart_check_command: str = None, restart_timeout: str = None, **kwargs)[source]¶ Bases:
azure.mgmt.imagebuilder.models._models_py3.ImageTemplateCustomizer
Reboots a VM and waits for it to come back online (Windows). Corresponds to Packer windows-restart provisioner.
All required parameters must be populated in order to send to Azure.
- Parameters
name (str) – Friendly Name to provide context on what this customization step does
type (str) – Required. Constant filled by server.
restart_command (str) – Command to execute the restart [Default: ‘shutdown /r /f /t 0 /c “packer restart”’]
restart_check_command (str) – Command to check if restart succeeded [Default: ‘’]
restart_timeout (str) – Restart timeout specified as a string of magnitude and unit, e.g. ‘5m’ (5 minutes) or ‘2h’ (2 hours) [Default: ‘5m’]
Bases:
azure.mgmt.imagebuilder.models._models_py3.ImageTemplateDistributor
Distribute via Shared Image Gallery.
All required parameters must be populated in order to send to Azure.
- Parameters
run_output_name (str) – Required. The name to be used for the associated RunOutput.
artifact_tags (dict[str, str]) – Tags that will be applied to the artifact once it has been created/updated by the distributor.
type (str) – Required. Constant filled by server.
gallery_image_id (str) – Required. Resource Id of the Shared Image Gallery image
replication_regions (list[str]) – Required. A list of regions that the image will be replicated to
exclude_from_latest (bool) – Flag that indicates whether created image version should be excluded from latest. Omit to use the default (false).
storage_account_type (str or SharedImageStorageAccountType) – Storage account type to be used to store the shared image. Omit to use the default (Standard_LRS). Possible values include: ‘Standard_LRS’, ‘Standard_ZRS’
Bases:
azure.mgmt.imagebuilder.models._models_py3.ImageTemplateSource
Describes an image source that is an image version in a shared image gallery.
All required parameters must be populated in order to send to Azure.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateShellCustomizer
(*, name: str = None, script_uri: str = None, sha256_checksum: str = None, inline=None, **kwargs)[source]¶ Bases:
azure.mgmt.imagebuilder.models._models_py3.ImageTemplateCustomizer
Runs a shell script during the customization phase (Linux). Corresponds to Packer shell provisioner. Exactly one of ‘scriptUri’ or ‘inline’ can be specified.
All required parameters must be populated in order to send to Azure.
- Parameters
name (str) – Friendly Name to provide context on what this customization step does
type (str) – Required. Constant filled by server.
script_uri (str) – URI of the shell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc
sha256_checksum (str) – SHA256 checksum of the shell script provided in the scriptUri field
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateSource
(**kwargs)[source]¶ Bases:
msrest.serialization.Model
Describes a virtual machine image source for building, customizing and distributing.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: ImageTemplatePlatformImageSource, ImageTemplateManagedImageSource, ImageTemplateSharedImageVersionSource
All required parameters must be populated in order to send to Azure.
- Parameters
type (str) – Required. Constant filled by server.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateUpdateParameters
(*, identity=None, tags=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Parameters for updating an image template.
- Parameters
identity (ImageTemplateIdentity) – The identity of the image template, if configured.
tags (dict[str, str]) – The user-specified tags associated with the image template.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateVhdDistributor
(*, run_output_name: str, artifact_tags=None, **kwargs)[source]¶ Bases:
azure.mgmt.imagebuilder.models._models_py3.ImageTemplateDistributor
Distribute via VHD in a storage account.
All required parameters must be populated in order to send to Azure.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateVmProfile
(*, vm_size: str = None, os_disk_size_gb: int = None, vnet_config=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Describes the virtual machine used to build, customize and capture images.
- Parameters
vm_size (str) – Size of the virtual machine used to build, customize and capture images. Omit or specify empty string to use the default (Standard_D1_v2).
os_disk_size_gb (int) – Size of the OS disk in GB. Omit or specify 0 to use Azure’s default OS disk size.
vnet_config (VirtualNetworkConfig) – Optional configuration of the virtual network to use to deploy the build virtual machine in. Omit if no specific virtual network needs to be used.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateWindowsUpdateCustomizer
(*, name: str = None, search_criteria: str = None, filters=None, update_limit: int = None, **kwargs)[source]¶ Bases:
azure.mgmt.imagebuilder.models._models_py3.ImageTemplateCustomizer
Installs Windows Updates. Corresponds to Packer Windows Update Provisioner (https://github.com/rgl/packer-provisioner-windows-update).
All required parameters must be populated in order to send to Azure.
- Parameters
name (str) – Friendly Name to provide context on what this customization step does
type (str) – Required. Constant filled by server.
search_criteria (str) – Criteria to search updates. Omit or specify empty string to use the default (search all). Refer to above link for examples and detailed description of this field.
filters (list[str]) – Array of filters to select updates to apply. Omit or specify empty array to use the default (no filter). Refer to above link for examples and detailed description of this field.
update_limit (int) – Maximum number of updates to apply at a time. Omit or specify 0 to use the default (1000)
-
class
azure.mgmt.imagebuilder.models.
InnerError
(*, exception_type: str = None, error_detail: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Inner error details.
-
class
azure.mgmt.imagebuilder.models.
Operation
(*, name: str = None, display=None, origin: str = None, properties=None, is_data_action: bool = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
A REST API operation.
- Parameters
name (str) – The operation name. This is of the format {provider}/{resource}/{operation}
display (OperationDisplay) – The object that describes the operation.
origin (str) – The intended executor of the operation.
properties (object) – Properties of the operation.
is_data_action (bool) – The flag that indicates whether the operation applies to data plane.
-
class
azure.mgmt.imagebuilder.models.
OperationDisplay
(*, provider: str = None, operation: str = None, resource: str = None, description: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
The object that describes the operation.
-
class
azure.mgmt.imagebuilder.models.
PlatformImagePurchasePlan
(*, plan_name: str, plan_product: str, plan_publisher: str, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Purchase plan configuration for platform image.
All required parameters must be populated in order to send to Azure.
-
class
azure.mgmt.imagebuilder.models.
ProvisioningError
(*, provisioning_error_code=None, message: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Describes the error happened when create or update an image template.
- Parameters
provisioning_error_code (str or ProvisioningErrorCode) – Error code of the provisioning failure. Possible values include: ‘BadSourceType’, ‘BadPIRSource’, ‘BadManagedImageSource’, ‘BadSharedImageVersionSource’, ‘BadCustomizerType’, ‘UnsupportedCustomizerType’, ‘NoCustomizerScript’, ‘BadDistributeType’, ‘BadSharedImageDistribute’, ‘ServerError’, ‘Other’
message (str) – Verbose error message about the provisioning failure
-
class
azure.mgmt.imagebuilder.models.
Resource
(*, location: str, tags=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
The Resource model definition.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
-
class
azure.mgmt.imagebuilder.models.
RunOutput
(*, name: str, artifact_id: str = None, artifact_uri: str = None, **kwargs)[source]¶ Bases:
azure.mgmt.imagebuilder.models._models_py3.SubResource
Represents an output that was created by running an image template.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
- Variables
- Parameters
-
class
azure.mgmt.imagebuilder.models.
SubResource
(*, name: str, **kwargs)[source]¶ Bases:
msrest.serialization.Model
The Sub Resource model definition.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
-
class
azure.mgmt.imagebuilder.models.
VirtualNetworkConfig
(*, subnet_id: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Virtual Network configuration.
- Parameters
subnet_id (str) – Resource id of a pre-existing subnet.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplatePaged
(*args, **kwargs)[source]¶ Bases:
msrest.paging.Paged
A paging container for iterating over a list of
ImageTemplate
objectBring async to Paging.
“async_command” is mandatory keyword argument for this mixin to work.
-
class
azure.mgmt.imagebuilder.models.
RunOutputPaged
(*args, **kwargs)[source]¶ Bases:
msrest.paging.Paged
A paging container for iterating over a list of
RunOutput
objectBring async to Paging.
“async_command” is mandatory keyword argument for this mixin to work.
-
class
azure.mgmt.imagebuilder.models.
OperationPaged
(*args, **kwargs)[source]¶ Bases:
msrest.paging.Paged
A paging container for iterating over a list of
Operation
objectBring async to Paging.
“async_command” is mandatory keyword argument for this mixin to work.
-
class
azure.mgmt.imagebuilder.models.
ProvisioningState
[source]¶ -
An enumeration.
-
creating
= 'Creating'¶
-
deleting
= 'Deleting'¶
-
failed
= 'Failed'¶
-
succeeded
= 'Succeeded'¶
-
updating
= 'Updating'¶
-
-
class
azure.mgmt.imagebuilder.models.
ProvisioningErrorCode
[source]¶ -
An enumeration.
-
bad_customizer_type
= 'BadCustomizerType'¶
-
bad_distribute_type
= 'BadDistributeType'¶
-
bad_managed_image_source
= 'BadManagedImageSource'¶
-
bad_pir_source
= 'BadPIRSource'¶
-
bad_source_type
= 'BadSourceType'¶
-
no_customizer_script
= 'NoCustomizerScript'¶
-
other
= 'Other'¶
-
server_error
= 'ServerError'¶
-
unsupported_customizer_type
= 'UnsupportedCustomizerType'¶
-
-
class
azure.mgmt.imagebuilder.models.
RunState
[source]¶ -
An enumeration.
-
canceled
= 'Canceled'¶
-
canceling
= 'Canceling'¶
-
failed
= 'Failed'¶
-
partially_succeeded
= 'PartiallySucceeded'¶
-
running
= 'Running'¶
-
succeeded
= 'Succeeded'¶
-
-
class
azure.mgmt.imagebuilder.models.
RunSubState
[source]¶ -
An enumeration.
-
building
= 'Building'¶
-
customizing
= 'Customizing'¶
-
distributing
= 'Distributing'¶
-
queued
= 'Queued'¶
-