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.
- Parameters
code (str) – The error code.
target (str) – The target of the particular error.
message (str) – The error message.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplate
(*, location: str, source, distribute, tags=None, customize=None, build_timeout_in_minutes: int = None, vm_profile=None, identity=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
id (str) – Resource Id
name (str) – Resource name
type (str) – Resource type
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
tags (dict[str, str]) – Resource tags
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) – 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, ImageTemplatePowerShellCustomizer, ImageTemplateFileCustomizer
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.
-
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.
- 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.
-
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. The type ‘None’ will remove any identities from the image template. Possible values include: ‘UserAssigned’, ‘None’
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.
- Variables
principal_id (str) – The principal id of user assigned identity.
client_id (str) – The client id of user assigned identity.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateIsoSource
(*, source_uri: str, sha256_checksum: str, **kwargs)[source]¶ Bases:
azure.mgmt.imagebuilder.models._models_py3.ImageTemplateSource
Describes an image source that is an installation ISO. Currently only supports Red Hat Enterprise Linux 7.2-7.5 ISO’s.
All required parameters must be populated in order to send to Azure.
- Parameters
type (str) – Required. Constant filled by server.
source_uri (str) – Required. URI to get the ISO image. This URI has to be accessible to the resource provider at the time of the image template creation.
sha256_checksum (str) – Required. SHA256 Checksum of the ISO image.
-
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’, ‘Succeeded’, ‘PartiallySucceeded’, ‘Failed’
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.
- Parameters
type (str) – Required. Constant filled by server.
image_id (str) – Required. ARM resource id of the managed image in customer subscription
-
class
azure.mgmt.imagebuilder.models.
ImageTemplatePlatformImageSource
(*, publisher: str = None, offer: str = None, sku: str = None, version: str = 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).
-
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
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.
- Parameters
type (str) – Required. Constant filled by server.
image_version_id (str) – Required. ARM resource id of the image version in the shared image gallery
-
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
inline (list[str]) – Array of shell commands to execute
-
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: ImageTemplateIsoSource, 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.
- 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.
-
class
azure.mgmt.imagebuilder.models.
ImageTemplateVmProfile
(*, vm_size: str = 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).
-
class
azure.mgmt.imagebuilder.models.
InnerError
(*, exception_type: str = None, error_detail: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
Inner error details.
- Parameters
exception_type (str) – The exception type.
error_detail (str) – The internal error message or exception dump.
-
class
azure.mgmt.imagebuilder.models.
Operation
(*, name: str = None, display=None, origin: str = None, properties=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.
-
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.
- Parameters
provider (str) – Friendly name of the resource provider.
operation (str) – The operation type. For example: read, write, delete, or listKeys/action
resource (str) – The resource type on which the operation is performed.
description (str) – The friendly name of the operation.
-
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’, ‘BadISOSource’, ‘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
id (str) – Resource Id
type (str) – Resource type
provisioning_state (str or ProvisioningState) – Provisioning state of the resource. Possible values include: ‘Creating’, ‘Updating’, ‘Succeeded’, ‘Failed’, ‘Deleting’
- Parameters
name (str) – Required. Resource name
artifact_id (str) – The resource id of the artifact.
artifact_uri (str) – The location URI of the artifact.
-
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.
- Variables
id (str) – Resource Id
type (str) – Resource type
- Parameters
name (str) – Required. Resource name
-
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]¶ Bases:
str
,enum.Enum
An enumeration.
-
creating
= 'Creating'¶
-
deleting
= 'Deleting'¶
-
failed
= 'Failed'¶
-
succeeded
= 'Succeeded'¶
-
updating
= 'Updating'¶
-
-
class
azure.mgmt.imagebuilder.models.
ProvisioningErrorCode
[source]¶ Bases:
str
,enum.Enum
An enumeration.
-
bad_customizer_type
= 'BadCustomizerType'¶
-
bad_distribute_type
= 'BadDistributeType'¶
-
bad_iso_source
= 'BadISOSource'¶
-
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]¶ Bases:
str
,enum.Enum
An enumeration.
-
failed
= 'Failed'¶
-
partially_succeeded
= 'PartiallySucceeded'¶
-
running
= 'Running'¶
-
succeeded
= 'Succeeded'¶
-