Class ImageTemplateRestartCustomizer
- java.lang.Object
-
- com.azure.resourcemanager.imagebuilder.models.ImageTemplateCustomizer
-
- com.azure.resourcemanager.imagebuilder.models.ImageTemplateRestartCustomizer
-
public final class ImageTemplateRestartCustomizer extends ImageTemplateCustomizer
Reboots a VM and waits for it to come back online (Windows). Corresponds to Packer windows-restart provisioner.
-
-
Constructor Summary
Constructors Constructor Description ImageTemplateRestartCustomizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
restartCheckCommand()
Get the restartCheckCommand property: Command to check if restart succeeded [Default: ''].String
restartCommand()
Get the restartCommand property: Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer restart"'].String
restartTimeout()
Get the restartTimeout property: Restart timeout specified as a string of magnitude and unit, e.g.void
validate()
Validates the instance.ImageTemplateRestartCustomizer
withName(String name)
Set the name property: Friendly Name to provide context on what this customization step does.ImageTemplateRestartCustomizer
withRestartCheckCommand(String restartCheckCommand)
Set the restartCheckCommand property: Command to check if restart succeeded [Default: ''].ImageTemplateRestartCustomizer
withRestartCommand(String restartCommand)
Set the restartCommand property: Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer restart"'].ImageTemplateRestartCustomizer
withRestartTimeout(String restartTimeout)
Set the restartTimeout property: Restart timeout specified as a string of magnitude and unit, e.g.-
Methods inherited from class com.azure.resourcemanager.imagebuilder.models.ImageTemplateCustomizer
name
-
-
-
-
Method Detail
-
restartCommand
public String restartCommand()
Get the restartCommand property: Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer restart"'].- Returns:
- the restartCommand value.
-
withRestartCommand
public ImageTemplateRestartCustomizer withRestartCommand(String restartCommand)
Set the restartCommand property: Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer restart"'].- Parameters:
restartCommand
- the restartCommand value to set.- Returns:
- the ImageTemplateRestartCustomizer object itself.
-
restartCheckCommand
public String restartCheckCommand()
Get the restartCheckCommand property: Command to check if restart succeeded [Default: ''].- Returns:
- the restartCheckCommand value.
-
withRestartCheckCommand
public ImageTemplateRestartCustomizer withRestartCheckCommand(String restartCheckCommand)
Set the restartCheckCommand property: Command to check if restart succeeded [Default: ''].- Parameters:
restartCheckCommand
- the restartCheckCommand value to set.- Returns:
- the ImageTemplateRestartCustomizer object itself.
-
restartTimeout
public String restartTimeout()
Get the restartTimeout property: Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m'].- Returns:
- the restartTimeout value.
-
withRestartTimeout
public ImageTemplateRestartCustomizer withRestartTimeout(String restartTimeout)
Set the restartTimeout property: Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m'].- Parameters:
restartTimeout
- the restartTimeout value to set.- Returns:
- the ImageTemplateRestartCustomizer object itself.
-
withName
public ImageTemplateRestartCustomizer 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.
-
-