Class AutoShutdownProfile
java.lang.Object
com.azure.resourcemanager.labservices.models.AutoShutdownProfile
Profile for how to handle shutting down virtual machines.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the disconnectDelay property: The amount of time a VM will stay running after a user disconnects if this behavior is enabled.Get the idleDelay property: The amount of time a VM will idle before it is shutdown if this behavior is enabled.Get the noConnectDelay property: The amount of time a VM will stay running before it is shutdown if no connection is made and this behavior is enabled.Get the shutdownOnDisconnect property: Whether shutdown on disconnect is enabled.Get the shutdownOnIdle property: Whether a VM will get shutdown when it has idled for a period of time.Get the shutdownWhenNotConnected property: Whether a VM will get shutdown when it hasn't been connected to after a period of time.void
validate()
Validates the instance.withDisconnectDelay
(Duration disconnectDelay) Set the disconnectDelay property: The amount of time a VM will stay running after a user disconnects if this behavior is enabled.withIdleDelay
(Duration idleDelay) Set the idleDelay property: The amount of time a VM will idle before it is shutdown if this behavior is enabled.withNoConnectDelay
(Duration noConnectDelay) Set the noConnectDelay property: The amount of time a VM will stay running before it is shutdown if no connection is made and this behavior is enabled.withShutdownOnDisconnect
(EnableState shutdownOnDisconnect) Set the shutdownOnDisconnect property: Whether shutdown on disconnect is enabled.withShutdownOnIdle
(ShutdownOnIdleMode shutdownOnIdle) Set the shutdownOnIdle property: Whether a VM will get shutdown when it has idled for a period of time.withShutdownWhenNotConnected
(EnableState shutdownWhenNotConnected) Set the shutdownWhenNotConnected property: Whether a VM will get shutdown when it hasn't been connected to after a period of time.
-
Constructor Details
-
AutoShutdownProfile
public AutoShutdownProfile()
-
-
Method Details
-
shutdownOnDisconnect
Get the shutdownOnDisconnect property: Whether shutdown on disconnect is enabled.- Returns:
- the shutdownOnDisconnect value.
-
withShutdownOnDisconnect
Set the shutdownOnDisconnect property: Whether shutdown on disconnect is enabled.- Parameters:
shutdownOnDisconnect
- the shutdownOnDisconnect value to set.- Returns:
- the AutoShutdownProfile object itself.
-
shutdownWhenNotConnected
Get the shutdownWhenNotConnected property: Whether a VM will get shutdown when it hasn't been connected to after a period of time.- Returns:
- the shutdownWhenNotConnected value.
-
withShutdownWhenNotConnected
Set the shutdownWhenNotConnected property: Whether a VM will get shutdown when it hasn't been connected to after a period of time.- Parameters:
shutdownWhenNotConnected
- the shutdownWhenNotConnected value to set.- Returns:
- the AutoShutdownProfile object itself.
-
shutdownOnIdle
Get the shutdownOnIdle property: Whether a VM will get shutdown when it has idled for a period of time.- Returns:
- the shutdownOnIdle value.
-
withShutdownOnIdle
Set the shutdownOnIdle property: Whether a VM will get shutdown when it has idled for a period of time.- Parameters:
shutdownOnIdle
- the shutdownOnIdle value to set.- Returns:
- the AutoShutdownProfile object itself.
-
disconnectDelay
Get the disconnectDelay property: The amount of time a VM will stay running after a user disconnects if this behavior is enabled.- Returns:
- the disconnectDelay value.
-
withDisconnectDelay
Set the disconnectDelay property: The amount of time a VM will stay running after a user disconnects if this behavior is enabled.- Parameters:
disconnectDelay
- the disconnectDelay value to set.- Returns:
- the AutoShutdownProfile object itself.
-
noConnectDelay
Get the noConnectDelay property: The amount of time a VM will stay running before it is shutdown if no connection is made and this behavior is enabled.- Returns:
- the noConnectDelay value.
-
withNoConnectDelay
Set the noConnectDelay property: The amount of time a VM will stay running before it is shutdown if no connection is made and this behavior is enabled.- Parameters:
noConnectDelay
- the noConnectDelay value to set.- Returns:
- the AutoShutdownProfile object itself.
-
idleDelay
Get the idleDelay property: The amount of time a VM will idle before it is shutdown if this behavior is enabled.- Returns:
- the idleDelay value.
-
withIdleDelay
Set the idleDelay property: The amount of time a VM will idle before it is shutdown if this behavior is enabled.- Parameters:
idleDelay
- the idleDelay value to set.- Returns:
- the AutoShutdownProfile object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-