exec.azurerm.compute.image¶
Azure Resource Manager (ARM) Compute Image Execution Module
New in version 1.0.0.
Changed in version 4.0.0.
maintainer: | |
---|---|
configuration: | This module requires Azure Resource Manager credentials to be passed as keyword arguments to every function or via acct in order to work properly. Required provider parameters:
Optional provider parameters: cloud_environment: Used to point the cloud driver to different API endpoints, such as Azure GovCloud. Possible values:
|
-
idem_azurerm.exec.azurerm.compute.image.
create_or_update
(hub, ctx, name, resource_group, source_vm=None, source_vm_group=None, os_disk=None, data_disks=None, zone_resilient=False, hyper_vgeneration=None, **kwargs)¶ New in version 1.0.0.
Changed in version 4.0.0.
Create or update an image.
Parameters: - name – The image to create.
- resource_group – The resource group name assigned to the image.
- source_vm – The name of the virtual machine from which the image is created. This parameter or a valid os_disk is required.
- source_vm_group – The name of the resource group containing the source virtual machine. This defaults to the same resource group specified for the resultant image.
- os_disk – The resource ID of an operating system disk to use for the image.
- data_disks – The resource ID or list of resource IDs associated with data disks to add to the image.
- zone_resilient – Specifies whether an image is zone resilient or not. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).
- hyper_vgeneration – Gets the HyperVGenerationType of the VirtualMachine created from the image. Possible values include: “V1” and “V2”.
CLI Example:
azurerm.compute.image.create_or_update testimage testgroup
-
idem_azurerm.exec.azurerm.compute.image.
delete
(hub, ctx, name, resource_group, **kwargs)¶ New in version 1.0.0.
Changed in version 4.0.0.
Delete an image.
Parameters: - name – The image to delete.
- resource_group – The resource group name assigned to the image.
CLI Example:
azurerm.compute.image.delete testimage testgroup
-
idem_azurerm.exec.azurerm.compute.image.
get
(hub, ctx, name, resource_group, **kwargs)¶ New in version 1.0.0.
Get properties of the specified image.
Parameters: - name – The name of the image to query.
- resource_group – The resource group name assigned to the image.
CLI Example:
azurerm.compute.image.get testimage testgroup
-
idem_azurerm.exec.azurerm.compute.image.
list_
(hub, ctx, resource_group=None, **kwargs)¶ New in version 4.0.0.
Gets the list of Images in the subscription.
Parameters: resource_group – The name of the resource group to limit the results. CLI Example:
azurerm.compute.image.list