RunCommandInput Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.RunCommandInput

Implements

public final class RunCommandInput
implements JsonSerializable<RunCommandInput>

Capture Virtual Machine parameters.

Constructor Summary

Constructor Description
RunCommandInput()

Creates an instance of RunCommandInput class.

Method Summary

Modifier and Type Method and Description
String commandId()

Get the commandId property: Specifies a commandId of predefined built-in script.

static RunCommandInput fromJson(JsonReader jsonReader)

Reads an instance of RunCommandInput from the JsonReader.

List<RunCommandInputParameter> parameters()

Get the parameters property: The run command parameters.

List<String> script()

Get the script property: Optional.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

RunCommandInput withCommandId(String commandId)

Set the commandId property: Specifies a commandId of predefined built-in script.

RunCommandInput withParameters(List<RunCommandInputParameter> parameters)

Set the parameters property: The run command parameters.

RunCommandInput withScript(List<String> script)

Set the script property: Optional.

Methods inherited from java.lang.Object

Constructor Details

RunCommandInput

public RunCommandInput()

Creates an instance of RunCommandInput class.

Method Details

commandId

public String commandId()

Get the commandId property: Specifies a commandId of predefined built-in script. Command IDs available for Linux are listed at https://aka.ms/RunCommandManagedLinux\#available-commands, Windows at https://aka.ms/RunCommandManagedWindows\#available-commands.

Returns:

the commandId value.

fromJson

public static RunCommandInput fromJson(JsonReader jsonReader)

Reads an instance of RunCommandInput from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

parameters

public List<RunCommandInputParameter> parameters()

Get the parameters property: The run command parameters.

Returns:

the parameters value.

script

public List<String> script()

Get the script property: Optional. The script to be executed. When this value is given, the given script will override the default script of the command.

Returns:

the script value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCommandId

public RunCommandInput withCommandId(String commandId)

Set the commandId property: Specifies a commandId of predefined built-in script. Command IDs available for Linux are listed at https://aka.ms/RunCommandManagedLinux\#available-commands, Windows at https://aka.ms/RunCommandManagedWindows\#available-commands.

Parameters:

commandId - the commandId value to set.

Returns:

the RunCommandInput object itself.

withParameters

public RunCommandInput withParameters(List<RunCommandInputParameter> parameters)

Set the parameters property: The run command parameters.

Parameters:

parameters - the parameters value to set.

Returns:

the RunCommandInput object itself.

withScript

public RunCommandInput withScript(List<String> script)

Set the script property: Optional. The script to be executed. When this value is given, the given script will override the default script of the command.

Parameters:

script - the script value to set.

Returns:

the RunCommandInput object itself.

Applies to