Class ImageTemplateShellCustomizer
- java.lang.Object
-
- com.azure.resourcemanager.imagebuilder.models.ImageTemplateCustomizer
-
- com.azure.resourcemanager.imagebuilder.models.ImageTemplateShellCustomizer
-
public final class ImageTemplateShellCustomizer extends ImageTemplateCustomizer
Runs a shell script during the customization phase (Linux). Corresponds to Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.
-
-
Constructor Summary
Constructors Constructor Description ImageTemplateShellCustomizer()
-
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 customizing.String
sha256Checksum()
Get the sha256Checksum property: SHA256 checksum of the shell script provided in the scriptUri field.void
validate()
Validates the instance.ImageTemplateShellCustomizer
withInline(List<String> inline)
Set the inline property: Array of shell commands to execute.ImageTemplateShellCustomizer
withName(String name)
Set the name property: Friendly Name to provide context on what this customization step does.ImageTemplateShellCustomizer
withScriptUri(String scriptUri)
Set the scriptUri property: URI of the shell script to be run for customizing.ImageTemplateShellCustomizer
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.ImageTemplateCustomizer
name
-
-
-
-
Method Detail
-
scriptUri
public String scriptUri()
Get the scriptUri property: URI of the shell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc.- Returns:
- the scriptUri value.
-
withScriptUri
public ImageTemplateShellCustomizer withScriptUri(String scriptUri)
Set the scriptUri property: URI of the shell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc.- Parameters:
scriptUri
- the scriptUri value to set.- Returns:
- the ImageTemplateShellCustomizer 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 ImageTemplateShellCustomizer 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 ImageTemplateShellCustomizer object itself.
-
inline
public List<String> inline()
Get the inline property: Array of shell commands to execute.- Returns:
- the inline value.
-
withInline
public ImageTemplateShellCustomizer withInline(List<String> inline)
Set the inline property: Array of shell commands to execute.- Parameters:
inline
- the inline value to set.- Returns:
- the ImageTemplateShellCustomizer object itself.
-
withName
public ImageTemplateShellCustomizer 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.
-
-