Class ImageTemplateFileCustomizer
- java.lang.Object
-
- com.azure.resourcemanager.imagebuilder.models.ImageTemplateCustomizer
-
- com.azure.resourcemanager.imagebuilder.models.ImageTemplateFileCustomizer
-
public final class ImageTemplateFileCustomizer extends ImageTemplateCustomizer
Uploads files to VMs (Linux, Windows). Corresponds to Packer file provisioner.
-
-
Constructor Summary
Constructors Constructor Description ImageTemplateFileCustomizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
destination()
Get the destination property: The absolute path to a file (with nested directory structures already created) where the file (from sourceUri) will be uploaded to in the VM.String
sha256Checksum()
Get the sha256Checksum property: SHA256 checksum of the file provided in the sourceUri field above.String
sourceUri()
Get the sourceUri property: The URI of the file to be uploaded for customizing the VM.void
validate()
Validates the instance.ImageTemplateFileCustomizer
withDestination(String destination)
Set the destination property: The absolute path to a file (with nested directory structures already created) where the file (from sourceUri) will be uploaded to in the VM.ImageTemplateFileCustomizer
withName(String name)
Set the name property: Friendly Name to provide context on what this customization step does.ImageTemplateFileCustomizer
withSha256Checksum(String sha256Checksum)
Set the sha256Checksum property: SHA256 checksum of the file provided in the sourceUri field above.ImageTemplateFileCustomizer
withSourceUri(String sourceUri)
Set the sourceUri property: The URI of the file to be uploaded for customizing the VM.-
Methods inherited from class com.azure.resourcemanager.imagebuilder.models.ImageTemplateCustomizer
name
-
-
-
-
Method Detail
-
sourceUri
public String sourceUri()
Get the sourceUri property: The URI of the file to be uploaded for customizing the VM. It can be a github link, SAS URI for Azure Storage, etc.- Returns:
- the sourceUri value.
-
withSourceUri
public ImageTemplateFileCustomizer withSourceUri(String sourceUri)
Set the sourceUri property: The URI of the file to be uploaded for customizing the VM. It can be a github link, SAS URI for Azure Storage, etc.- Parameters:
sourceUri
- the sourceUri value to set.- Returns:
- the ImageTemplateFileCustomizer object itself.
-
sha256Checksum
public String sha256Checksum()
Get the sha256Checksum property: SHA256 checksum of the file provided in the sourceUri field above.- Returns:
- the sha256Checksum value.
-
withSha256Checksum
public ImageTemplateFileCustomizer withSha256Checksum(String sha256Checksum)
Set the sha256Checksum property: SHA256 checksum of the file provided in the sourceUri field above.- Parameters:
sha256Checksum
- the sha256Checksum value to set.- Returns:
- the ImageTemplateFileCustomizer object itself.
-
destination
public String destination()
Get the destination property: The absolute path to a file (with nested directory structures already created) where the file (from sourceUri) will be uploaded to in the VM.- Returns:
- the destination value.
-
withDestination
public ImageTemplateFileCustomizer withDestination(String destination)
Set the destination property: The absolute path to a file (with nested directory structures already created) where the file (from sourceUri) will be uploaded to in the VM.- Parameters:
destination
- the destination value to set.- Returns:
- the ImageTemplateFileCustomizer object itself.
-
withName
public ImageTemplateFileCustomizer withName(String name)
Set the name property: Friendly Name to provide context on what this customization step does.- Overrides:
withName
in classImageTemplateCustomizer
- Parameters:
name
- the name value to set.- Returns:
- the ImageTemplateCustomizer object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validate
in classImageTemplateCustomizer
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-