Share via


AutoShutdownProfile Class

  • java.lang.Object
    • com.azure.resourcemanager.labservices.models.AutoShutdownProfile

Implements

public final class AutoShutdownProfile
implements JsonSerializable<AutoShutdownProfile>

Profile for how to handle shutting down virtual machines.

Constructor Summary

Constructor Description
AutoShutdownProfile()

Creates an instance of AutoShutdownProfile class.

Method Summary

Modifier and Type Method and Description
Duration disconnectDelay()

Get the disconnectDelay property: The amount of time a VM will stay running after a user disconnects if this behavior is enabled.

static AutoShutdownProfile fromJson(JsonReader jsonReader)

Reads an instance of AutoShutdownProfile from the JsonReader.

Duration idleDelay()

Get the idleDelay property: The amount of time a VM will idle before it is shutdown if this behavior is enabled.

Duration 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.

EnableState shutdownOnDisconnect()

Get the shutdownOnDisconnect property: Whether shutdown on disconnect is enabled.

ShutdownOnIdleMode shutdownOnIdle()

Get the shutdownOnIdle property: Whether a VM will get shutdown when it has idled for a period of time.

EnableState shutdownWhenNotConnected()

Get the shutdownWhenNotConnected property: Whether a VM will get shutdown when it hasn't been connected to after a period of time.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

AutoShutdownProfile 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.

AutoShutdownProfile withIdleDelay(Duration idleDelay)

Set the idleDelay property: The amount of time a VM will idle before it is shutdown if this behavior is enabled.

AutoShutdownProfile 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.

AutoShutdownProfile withShutdownOnDisconnect(EnableState shutdownOnDisconnect)

Set the shutdownOnDisconnect property: Whether shutdown on disconnect is enabled.

AutoShutdownProfile withShutdownOnIdle(ShutdownOnIdleMode shutdownOnIdle)

Set the shutdownOnIdle property: Whether a VM will get shutdown when it has idled for a period of time.

AutoShutdownProfile 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.

Methods inherited from java.lang.Object

Constructor Details

AutoShutdownProfile

public AutoShutdownProfile()

Creates an instance of AutoShutdownProfile class.

Method Details

disconnectDelay

public Duration 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.

fromJson

public static AutoShutdownProfile fromJson(JsonReader jsonReader)

Reads an instance of AutoShutdownProfile from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AutoShutdownProfile if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the AutoShutdownProfile.

idleDelay

public Duration 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.

noConnectDelay

public Duration 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.

shutdownOnDisconnect

public EnableState shutdownOnDisconnect()

Get the shutdownOnDisconnect property: Whether shutdown on disconnect is enabled.

Returns:

the shutdownOnDisconnect value.

shutdownOnIdle

public ShutdownOnIdleMode shutdownOnIdle()

Get the shutdownOnIdle property: Whether a VM will get shutdown when it has idled for a period of time.

Returns:

the shutdownOnIdle value.

shutdownWhenNotConnected

public EnableState 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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDisconnectDelay

public AutoShutdownProfile 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.

Parameters:

disconnectDelay - the disconnectDelay value to set.

Returns:

the AutoShutdownProfile object itself.

withIdleDelay

public AutoShutdownProfile withIdleDelay(Duration idleDelay)

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.

withNoConnectDelay

public AutoShutdownProfile 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.

Parameters:

noConnectDelay - the noConnectDelay value to set.

Returns:

the AutoShutdownProfile object itself.

withShutdownOnDisconnect

public AutoShutdownProfile withShutdownOnDisconnect(EnableState shutdownOnDisconnect)

Set the shutdownOnDisconnect property: Whether shutdown on disconnect is enabled.

Parameters:

shutdownOnDisconnect - the shutdownOnDisconnect value to set.

Returns:

the AutoShutdownProfile object itself.

withShutdownOnIdle

public AutoShutdownProfile withShutdownOnIdle(ShutdownOnIdleMode shutdownOnIdle)

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.

withShutdownWhenNotConnected

public AutoShutdownProfile 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.

Parameters:

shutdownWhenNotConnected - the shutdownWhenNotConnected value to set.

Returns:

the AutoShutdownProfile object itself.

Applies to