Class ComputeInstanceSshSettings
java.lang.Object
com.azure.resourcemanager.machinelearning.models.ComputeInstanceSshSettings
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ComputeInstanceSshSettings>
public final class ComputeInstanceSshSettings
extends Object
implements com.azure.json.JsonSerializable<ComputeInstanceSshSettings>
Specifies policy and settings for SSH access.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ComputeInstanceSshSettings class. -
Method Summary
Modifier and TypeMethodDescriptionGet the adminPublicKey property: Specifies the SSH rsa public key file as a string.Get the adminUsername property: Describes the admin user name.static ComputeInstanceSshSettingsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ComputeInstanceSshSettings from the JsonReader.sshPort()Get the sshPort property: Describes the port for connecting through SSH.Get the sshPublicAccess property: State of the public SSH port.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAdminPublicKey(String adminPublicKey) Set the adminPublicKey property: Specifies the SSH rsa public key file as a string.withSshPublicAccess(SshPublicAccess sshPublicAccess) Set the sshPublicAccess property: State of the public SSH port.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ComputeInstanceSshSettings
public ComputeInstanceSshSettings()Creates an instance of ComputeInstanceSshSettings class.
-
-
Method Details
-
sshPublicAccess
Get the sshPublicAccess property: State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable.- Returns:
- the sshPublicAccess value.
-
withSshPublicAccess
Set the sshPublicAccess property: State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable.- Parameters:
sshPublicAccess- the sshPublicAccess value to set.- Returns:
- the ComputeInstanceSshSettings object itself.
-
adminUsername
Get the adminUsername property: Describes the admin user name.- Returns:
- the adminUsername value.
-
sshPort
Get the sshPort property: Describes the port for connecting through SSH.- Returns:
- the sshPort value.
-
adminPublicKey
Get the adminPublicKey property: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs.- Returns:
- the adminPublicKey value.
-
withAdminPublicKey
Set the adminPublicKey property: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs.- Parameters:
adminPublicKey- the adminPublicKey value to set.- Returns:
- the ComputeInstanceSshSettings object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ComputeInstanceSshSettings>- Throws:
IOException
-
fromJson
public static ComputeInstanceSshSettings fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ComputeInstanceSshSettings from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ComputeInstanceSshSettings 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 ComputeInstanceSshSettings.
-