Class ImageTemplateShellValidator
- java.lang.Object
-
- com.azure.resourcemanager.imagebuilder.models.ImageTemplateInVMValidator
-
- com.azure.resourcemanager.imagebuilder.models.ImageTemplateShellValidator
-
public final class ImageTemplateShellValidator extends ImageTemplateInVMValidator
Runs the specified shell script during the validation phase (Linux). Corresponds to Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.
-
-
Constructor Summary
Constructors Constructor Description ImageTemplateShellValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
inline()
Get the inline property: Array of shell commands to execute.String
scriptUri()
Get the scriptUri property: URI of the shell script to be run for validation.String
sha256Checksum()
Get the sha256Checksum property: SHA256 checksum of the shell script provided in the scriptUri field.void
validate()
Validates the instance.ImageTemplateShellValidator
withInline(List<String> inline)
Set the inline property: Array of shell commands to execute.ImageTemplateShellValidator
withName(String name)
Set the name property: Friendly Name to provide context on what this validation step does.ImageTemplateShellValidator
withScriptUri(String scriptUri)
Set the scriptUri property: URI of the shell script to be run for validation.ImageTemplateShellValidator
withSha256Checksum(String sha256Checksum)
Set the sha256Checksum property: SHA256 checksum of the shell script provided in the scriptUri field.-
Methods inherited from class com.azure.resourcemanager.imagebuilder.models.ImageTemplateInVMValidator
name
-
-
-
-
Method Detail
-
scriptUri
public String scriptUri()
Get the scriptUri property: URI of the shell script to be run for validation. It can be a github link, Azure Storage URI, etc.- Returns:
- the scriptUri value.
-
withScriptUri
public ImageTemplateShellValidator withScriptUri(String scriptUri)
Set the scriptUri property: URI of the shell script to be run for validation. It can be a github link, Azure Storage URI, etc.- Parameters:
scriptUri
- the scriptUri value to set.- Returns:
- the ImageTemplateShellValidator object itself.
-
sha256Checksum
public String sha256Checksum()
Get the sha256Checksum property: SHA256 checksum of the shell script provided in the scriptUri field.- Returns:
- the sha256Checksum value.
-
withSha256Checksum
public ImageTemplateShellValidator withSha256Checksum(String sha256Checksum)
Set the sha256Checksum property: SHA256 checksum of the shell script provided in the scriptUri field.- Parameters:
sha256Checksum
- the sha256Checksum value to set.- Returns:
- the ImageTemplateShellValidator object itself.
-
inline
public List<String> inline()
Get the inline property: Array of shell commands to execute.- Returns:
- the inline value.
-
withInline
public ImageTemplateShellValidator withInline(List<String> inline)
Set the inline property: Array of shell commands to execute.- Parameters:
inline
- the inline value to set.- Returns:
- the ImageTemplateShellValidator object itself.
-
withName
public ImageTemplateShellValidator withName(String name)
Set the name property: Friendly Name to provide context on what this validation step does.- Overrides:
withName
in classImageTemplateInVMValidator
- Parameters:
name
- the name value to set.- Returns:
- the ImageTemplateInVMValidator object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validate
in classImageTemplateInVMValidator
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-